[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:23:41 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit e3722a0d109f28820397e3a088a0a3345834fe13
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Feb 6 01:41:41 2003 +0000

    WebKit:
            WebHistory* API clenaup.
    
            Reviewed by Chris.
    
            * Bookmarks.subproj/WebBookmarkLeaf.m:
            * History.subproj/WebHistory.h:
            * History.subproj/WebHistory.m:
            * History.subproj/WebHistoryItem.h:
            * History.subproj/WebHistoryItem.m:
            (-[WebHistoryItem title]):
            (-[WebHistoryItem setDisplayTitle:]):
            (-[WebHistoryItem hash]):
            (-[WebHistoryItem anchor]):
            (-[WebHistoryItem isEqual:]):
            (-[WebHistoryItem description]):
            (-[WebHistoryItem _retainIconInDatabase:]):
            (+[WebHistoryItem entryWithURL:]):
            (-[WebHistoryItem initWithURL:title:]):
            (-[WebHistoryItem initWithURL:target:parent:title:]):
            (-[WebHistoryItem URL]):
            (-[WebHistoryItem target]):
            (-[WebHistoryItem parent]):
            (-[WebHistoryItem dictionaryRepresentation]):
            (-[WebHistoryItem initFromDictionaryRepresentation:]):
            * History.subproj/WebHistoryItemPrivate.h:
            * History.subproj/WebHistoryPrivate.h:
            * History.subproj/WebHistoryPrivate.m:
            * WebKit.pbproj/project.pbxproj:
            * WebView.subproj/WebController.h:
            * WebView.subproj/WebController.m:
            (-[WebController setPreferences:]):
            (-[WebController preferences]):
            * WebView.subproj/WebControllerPrivate.h:
            * WebView.subproj/WebControllerPrivate.m:
            (-[WebControllerPrivate dealloc]):
            * WebView.subproj/WebDataSourcePrivate.m:
            * WebView.subproj/WebFramePrivate.m:
    WebBrowser:
            WebHistory* API clenaup.
    
            Reviewed by Chris.
    
            * BrowserDocument.m:
            * Debug/DebugUtilities.m:
            * GlobalHistory.m:
            (-[GlobalHistory updateDisplayTitleForHistoryItem:]):
            * URLCompletionController.m:
            (-[URLCompletionController tableView:objectValueForTableColumn:row:]):
    Tests:
            Added (-[DataResourceRequest initWithString:]).
    
            Reviewed by me.
    
            * SnippetEditor/DataResourceRequest.h:
            * SnippetEditor/DataResourceRequest.m:
            (-[DataResourceRequest initWithString:]):
            * SnippetEditor/SnippetController.m:
            (-[SnippetController updateFromText:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3578 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m b/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
index 50b3fe8..efdd2ab 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
@@ -11,6 +11,7 @@
 #import <WebKit/WebBookmarkGroup.h>
 #import <WebKit/WebBookmarkGroupPrivate.h>
 #import <WebKit/WebHistoryItem.h>
+#import <WebKit/WebHistoryItemPrivate.h>
 #import <WebFoundation/WebAssertions.h>
 
 #import <WebFoundation/WebNSURLExtras.h>
@@ -18,6 +19,9 @@
 #define URIDictionaryKey	@"URIDictionary"
 #define URLStringKey		@"URLString"
 
+// FIXME.  This class really shouldn't be using a WebHistoryItem to hold
+// it's URL, title and icon.  WebHistoryItem has significantly evolved from
+// it original implementation and is no longer appropriate.
 @implementation WebBookmarkLeaf
 
 - (id)init
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 6ed7aa8..8293f19 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,45 @@
 2003-02-05  Richard Williamson   <rjw at apple.com>
 
+        WebHistory* API clenaup.
+
+        Reviewed by Chris.
+
+        * Bookmarks.subproj/WebBookmarkLeaf.m:
+        * History.subproj/WebHistory.h:
+        * History.subproj/WebHistory.m:
+        * History.subproj/WebHistoryItem.h:
+        * History.subproj/WebHistoryItem.m:
+        (-[WebHistoryItem title]):
+        (-[WebHistoryItem setDisplayTitle:]):
+        (-[WebHistoryItem hash]):
+        (-[WebHistoryItem anchor]):
+        (-[WebHistoryItem isEqual:]):
+        (-[WebHistoryItem description]):
+        (-[WebHistoryItem _retainIconInDatabase:]):
+        (+[WebHistoryItem entryWithURL:]):
+        (-[WebHistoryItem initWithURL:title:]):
+        (-[WebHistoryItem initWithURL:target:parent:title:]):
+        (-[WebHistoryItem URL]):
+        (-[WebHistoryItem target]):
+        (-[WebHistoryItem parent]):
+        (-[WebHistoryItem dictionaryRepresentation]):
+        (-[WebHistoryItem initFromDictionaryRepresentation:]):
+        * History.subproj/WebHistoryItemPrivate.h:
+        * History.subproj/WebHistoryPrivate.h:
+        * History.subproj/WebHistoryPrivate.m:
+        * WebKit.pbproj/project.pbxproj:
+        * WebView.subproj/WebController.h:
+        * WebView.subproj/WebController.m:
+        (-[WebController setPreferences:]):
+        (-[WebController preferences]):
+        * WebView.subproj/WebControllerPrivate.h:
+        * WebView.subproj/WebControllerPrivate.m:
+        (-[WebControllerPrivate dealloc]):
+        * WebView.subproj/WebDataSourcePrivate.m:
+        * WebView.subproj/WebFramePrivate.m:
+
+2003-02-05  Richard Williamson   <rjw at apple.com>
+
         Cleanup public WebHistory API, stage 1.
 
         Reviewed by trey.
diff --git a/WebKit/History.subproj/WebHistory.h b/WebKit/History.subproj/WebHistory.h
index c7344de..c98e6cc 100644
--- a/WebKit/History.subproj/WebHistory.h
+++ b/WebKit/History.subproj/WebHistory.h
@@ -3,8 +3,6 @@
 	Copyright 2001, 2002, Apple Computer, Inc.
 
         Public header file.
-        
-        FIXME  Strip down this API.
 */
 #import <Foundation/Foundation.h>
 
@@ -44,26 +42,12 @@ extern NSString *WebHistoryLoadedNotification;
 + (WebHistory *)createSharedHistoryWithFile: (NSString*)file;
 
 /*!
-    @method initWithFile:
-    @abstract The designated initializer for WebHistory.
-    @result Returns an initialized WebHistory.
-*/
-- initWithFile: (NSString *)file;
-
-/*!
     @method addEntry:
     @param entry
 */
 - (void)addEntry: (WebHistoryItem *)entry;
 
 /*!
-    @method addEntryForURLString:
-    @param URL
-    @result Newly created WebHistoryItem
-*/
-- (WebHistoryItem *)addEntryForURL: (NSURL *)URL;
-
-/*!
     @method addEntries:
     @param newEntries
 */
@@ -126,13 +110,6 @@ extern NSString *WebHistoryLoadedNotification;
 - (NSString *)file;
 
 /*!
-    @method loadHistory
-    @discussion Load history from file. This happens automatically at init time, and need not normally be called.
-    @result Returns YES if successful, not otherwise.
-*/
-- (BOOL)loadHistory;
-
-/*!
     @method saveHistory
     @discussion Save history to file. It is the client's responsibility to call this at appropriate times.
     @result Returns YES if successful, not otherwise.
diff --git a/WebKit/History.subproj/WebHistory.m b/WebKit/History.subproj/WebHistory.m
index 0e68ced..472b9e0 100644
--- a/WebKit/History.subproj/WebHistory.m
+++ b/WebKit/History.subproj/WebHistory.m
@@ -8,6 +8,7 @@
 #import <WebKit/WebHistory.h>
 #import <WebKit/WebHistoryPrivate.h>
 #import <WebKit/WebHistoryItem.h>
+#import <WebKit/WebHistoryItemPrivate.h>
 
 #import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebNSURLExtras.h>
diff --git a/WebKit/History.subproj/WebHistoryItem.h b/WebKit/History.subproj/WebHistoryItem.h
index 75da43e..cd09390 100644
--- a/WebKit/History.subproj/WebHistoryItem.h
+++ b/WebKit/History.subproj/WebHistoryItem.h
@@ -1,6 +1,8 @@
 /*	
     WebHistoryItem.h
     Copyright 2001, 2002, Apple, Inc. All rights reserved.
+
+    Public header file.
 */
 
 #import <Cocoa/Cocoa.h>
@@ -9,6 +11,11 @@
 
 /*!
     @class WebHistoryItem
+    @discussion  WebHistoryItems are created by WebKit to represent pages visited.
+    The WebBackForwardList and WebHistory classes both use WebHistoryItems to represent
+    pages visited.  With the exception of the displayTitle, the properties of 
+    WebHistoryItems are set by WebKit.
+    WebHistoryItems cannot be created directly.
 */
 @interface WebHistoryItem : NSObject
 {
@@ -32,52 +39,56 @@
     NSString *_formReferrer;    
 }
 
-+ (WebHistoryItem *)entryWithURL:(NSURL *)URL;
-
-- (id)initWithURL:(NSURL *)URL title:(NSString *)title;
-- (id)initWithURL:(NSURL *)URL target:(NSString *)target parent:(NSString *)parent title:(NSString *)title;
-
-- (NSDictionary *)dictionaryRepresentation;
-- (id)initFromDictionaryRepresentation:(NSDictionary *)dict;
-
-- (NSURL *)URL;
+/*!
+    @method URLString
+    @abstract The string representation of the URL represented by this item.
+    @discussion The URLString may be different than the originalURLString if the page
+    redirected to a new location.
+*/
 - (NSString *)URLString;
+
+/*!
+    @method originalURLString
+    @abstract The string representation of the originial URL of this item.
+*/
 - (NSString *)originalURLString;
-- (NSString *)target;
-- (NSString *)parent;
+
+/*!
+    @method title
+    @abstract The title of the page represented by this item.
+    @discussion This title cannot be changed by the client.
+*/
 - (NSString *)title;
-- (NSString *)displayTitle;
-- (NSImage *)icon;
-- (NSCalendarDate *)lastVisitedDate;
-- (NSPoint)scrollPoint;
-- (NSArray *)documentState;
-- (BOOL)isTargetItem;
-- (NSString *)anchor;
-- (NSData *)formData;
-- (NSString *)formContentType;
-- (NSString *)formReferrer;    
 
-- (void)setURL:(NSURL *)URL;
-- (void)setOriginalURLString:(NSString *)URL;
-- (void)setTarget:(NSString *)target;
-- (void)setParent:(NSString *)parent;
-- (void)setTitle:(NSString *)title;
+/*!
+    @method setDisplayTitle:
+    @param displayTitle The new display title for this item.
+    @abstract A title that may be used by the client to display this item.
+*/
 - (void)setDisplayTitle:(NSString *)displayTitle;
-- (void)setLastVisitedDate:(NSCalendarDate *)date;
-- (void)setScrollPoint:(NSPoint)p;
-- (void)setDocumentState:(NSArray *)state;
-- (void)setIsTargetItem:(BOOL)flag;
-- (void)setAnchor:(NSString *)anchor;
-- (void)setFormData:(NSData *)data;
-- (void)setFormContentType:(NSString *)type;
-- (void)setFormReferrer:(NSString *)referrer;    
 
-- (NSArray *)children;
-- (void)addChildItem:(WebHistoryItem *)item;
-- (WebHistoryItem *)childItemWithName:(NSString *)name;
-- (WebHistoryItem *)targetItem;
+/*
+    @method title
+    @abstract A title that may be used by the client to display this item.
+*/
+- (NSString *)displayTitle;
+
+/*!
+    @method icon
+    @abstract The favorite icon of the page represented by this item.
+*/
+- (NSImage *)icon;
 
-- (void)setAlwaysAttemptToUsePageCache: (BOOL)flag;
-- (BOOL)alwaysAttemptToUsePageCache;
+/*!
+    @method lastVisitedDate
+    @abstract The last time the page represented by this item was visited.
+*/
+- (NSCalendarDate *)lastVisitedDate;
+
+/*!
+    @method anchor
+    @abstract The name of the fragment anchor, if any, represented by the URL for this item.
+*/
+- (NSString *)anchor;
 
 @end
diff --git a/WebKit/History.subproj/WebHistoryItem.m b/WebKit/History.subproj/WebHistoryItem.m
index 8bfe522..3fe0e76 100644
--- a/WebKit/History.subproj/WebHistoryItem.m
+++ b/WebKit/History.subproj/WebHistoryItem.m
@@ -18,51 +18,11 @@
 
 @implementation WebHistoryItem
 
-- (void)_retainIconInDatabase:(BOOL)retain
-{
-    if (_URLString) {
-        WebIconDatabase *iconDB = [WebIconDatabase sharedIconDatabase];
-        if (retain) {
-            [iconDB retainIconForURL:_URLString];
-        } else {
-            [iconDB releaseIconForURL:_URLString];
-        }
-    }
-}
-
-+ (WebHistoryItem *)entryWithURL:(NSURL *)URL
-{
-    return [[[self alloc] initWithURL:URL title:nil] autorelease];
-}
-
 - (id)init
 {
     return [self initWithURL:nil title:nil];
 }
 
-- (id)initWithURL:(NSURL *)URL title:(NSString *)title
-{
-    return [self initWithURL:URL target:nil parent:nil title:title];
-}
-
-- (id)initWithURL:(NSURL *)URL target:(NSString *)target parent:(NSString *)parent title:(NSString *)title
-{
-    if (self != [super init])
-    {
-        return nil;
-    }
-    
-    _URLString = [[URL absoluteString] copy];
-    _target = [target copy];
-    _parent = [parent copy];
-    _title = [title copy];
-    _lastVisitedDate = [[NSCalendarDate alloc] init];
-
-    [self _retainIconInDatabase:YES];
-    
-    return self;
-}
-
 - (void)dealloc
 {
     [self _retainIconInDatabase:NO];
@@ -85,11 +45,6 @@
     [super dealloc];
 }
 
-- (NSURL *)URL
-{
-    return _URLString ? [NSURL _web_URLWithString:_URLString] : nil;
-}
-
 // FIXME: need to decide it this class ever returns URLs, and the name of this method
 - (NSString *)URLString
 {
@@ -103,20 +58,23 @@
     return _originalURLString;
 }
 
-- (NSString *)target
+- (NSString *)title
 {
-    return _target;
+    return _title;
 }
 
-- (NSString *)parent
+- (void)setDisplayTitle:(NSString *)displayTitle
 {
-    return _parent;
+    NSString *newDisplayTitle;
+    if (displayTitle && [displayTitle isEqualToString:_title]) {
+        newDisplayTitle = [_title retain];
+    } else {
+        newDisplayTitle = [displayTitle copy];
+    }
+    [_displayTitle release];
+    _displayTitle = newDisplayTitle;
 }
 
-- (NSString *)title
-{
-    return _title;
-}
 
 - (NSString *)displayTitle;
 {
@@ -136,6 +94,117 @@
     return _lastVisitedDate;
 }
 
+- (unsigned)hash
+{
+    return [_URLString hash];
+}
+
+- (NSString *)anchor
+{
+    return anchor;
+}
+
+- (BOOL)isEqual:(id)anObject
+{
+    if (![anObject isMemberOfClass:[WebHistoryItem class]]) {
+        return NO;
+    }
+    
+    NSString *otherURL = ((WebHistoryItem *)anObject)->_URLString;
+    return _URLString == otherURL || [_URLString isEqualToString:otherURL];
+}
+
+- (NSString *)description
+{
+    NSMutableString *result = [NSMutableString stringWithFormat:@"%@ %@", [super description], _URLString];
+    if (_target) {
+        [result appendFormat:@" in \"%@\"", _target];
+    }
+    if (_isTargetItem) {
+        [result appendString:@" *target*"];
+    }
+    if (_formData) {
+        [result appendString:@" *POST*"];
+    }
+    if (_subItems) {
+        int currPos = [result length];
+        int i;
+        for (i = 0; i < (int)[_subItems count]; i++) {
+            WebHistoryItem *child = [_subItems objectAtIndex:i];
+            [result appendString:@"\n"];
+            [result appendString:[child description]];
+        }
+        // shift all the contents over.  A bit slow, but hey, this is for debugging.
+        NSRange replRange = {currPos, [result length]-currPos};
+        [result replaceOccurrencesOfString:@"\n" withString:@"\n    " options:0 range:replRange];
+    }
+    return result;
+}
+
+ at end
+
+ at interface WebWindowWatcher : NSObject
+ at end
+
+ at implementation WebHistoryItem (WebPrivate)
+
+- (void)_retainIconInDatabase:(BOOL)retain
+{
+    if (_URLString) {
+        WebIconDatabase *iconDB = [WebIconDatabase sharedIconDatabase];
+        if (retain) {
+            [iconDB retainIconForURL:_URLString];
+        } else {
+            [iconDB releaseIconForURL:_URLString];
+        }
+    }
+}
+
+
++ (WebHistoryItem *)entryWithURL:(NSURL *)URL
+{
+    return [[[self alloc] initWithURL:URL title:nil] autorelease];
+}
+
+
+- (id)initWithURL:(NSURL *)URL title:(NSString *)title
+{
+    return [self initWithURL:URL target:nil parent:nil title:title];
+}
+
+- (id)initWithURL:(NSURL *)URL target:(NSString *)target parent:(NSString *)parent title:(NSString *)title
+{
+    if (self != [super init])
+    {
+        return nil;
+    }
+
+    _URLString = [[URL absoluteString] copy];
+    _target = [target copy];
+    _parent = [parent copy];
+    _title = [title copy];
+    _lastVisitedDate = [[NSCalendarDate alloc] init];
+
+    [self _retainIconInDatabase:YES];
+
+    return self;
+}
+
+- (NSURL *)URL
+{
+    return _URLString ? [NSURL _web_URLWithString:_URLString] : nil;
+}
+
+- (NSString *)target
+{
+    return _target;
+}
+
+- (NSString *)parent
+{
+    return _parent;
+}
+
 - (void)setURL:(NSURL *)URL
 {
     NSString *string = [URL absoluteString];
@@ -182,18 +251,6 @@
     _parent = copy;
 }
 
-- (void)setDisplayTitle:(NSString *)displayTitle
-{
-    NSString *newDisplayTitle;
-    if (displayTitle && [displayTitle isEqualToString:_title]) {
-        newDisplayTitle = [_title retain];
-    } else {
-        newDisplayTitle = [displayTitle copy];
-    }
-    [_displayTitle release];
-    _displayTitle = newDisplayTitle;
-}
-
 - (void)setLastVisitedDate:(NSCalendarDate *)date
 {
     [date retain];
@@ -223,16 +280,6 @@
     _scrollPoint = scrollPoint;
 }
 
-- (unsigned)hash
-{
-    return [_URLString hash];
-}
-
-- (NSString *)anchor
-{
-    return anchor;
-}
-
 - (void)setAnchor:(NSString *)a
 {
     NSString *copy = [a copy];
@@ -315,16 +362,6 @@
     _formReferrer = copy;
 }
 
-- (BOOL)isEqual:(id)anObject
-{
-    if (![anObject isMemberOfClass:[WebHistoryItem class]]) {
-        return NO;
-    }
-    
-    NSString *otherURL = ((WebHistoryItem *)anObject)->_URLString;
-    return _URLString == otherURL || [_URLString isEqualToString:otherURL];
-}
-
 - (NSArray *)children
 {
     return _subItems;
@@ -351,33 +388,6 @@
     return nil;
 }
 
-- (NSString *)description
-{
-    NSMutableString *result = [NSMutableString stringWithFormat:@"%@ %@", [super description], _URLString];
-    if (_target) {
-        [result appendFormat:@" in \"%@\"", _target];
-    }
-    if (_isTargetItem) {
-        [result appendString:@" *target*"];
-    }
-    if (_formData) {
-        [result appendString:@" *POST*"];
-    }
-    if (_subItems) {
-        int currPos = [result length];
-        int i;
-        for (i = 0; i < (int)[_subItems count]; i++) {
-            WebHistoryItem *child = [_subItems objectAtIndex:i];
-            [result appendString:@"\n"];
-            [result appendString:[child description]];
-        }
-        // shift all the contents over.  A bit slow, but hey, this is for debugging.
-        NSRange replRange = {currPos, [result length]-currPos};
-        [result replaceOccurrencesOfString:@"\n" withString:@"\n    " options:0 range:replRange];
-    }
-    return result;
-}
-
 - (NSDictionary *)dictionaryRepresentation
 {
     NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:6];
@@ -403,7 +413,7 @@
         }
         [dict setObject: childDicts forKey: @"children"];
     }
-    
+
     return dict;
 }
 
@@ -413,7 +423,7 @@
     NSString *title = [dict _web_stringForKey:@"title"];
 
     [self initWithURL:(URLString ? [NSURL _web_URLWithString:URLString] : nil) title:title];
-    
+
     [self setDisplayTitle:[dict _web_stringForKey:@"displayTitle"]];
     NSString *date = [dict _web_stringForKey:@"lastVisitedDate"];
     if (date) {
@@ -422,7 +432,7 @@
         [self setLastVisitedDate:calendarDate];
         [calendarDate release];
     }
-    
+
     NSArray *childDicts = [dict objectForKey:@"children"];
     if (childDicts) {
         _subItems = [[NSMutableArray alloc] initWithCapacity:[childDicts count]];
@@ -447,12 +457,6 @@
 }
 
 
- at end
-
- at interface WebWindowWatcher : NSObject
- at end
-
- at implementation WebHistoryItem (WebPrivate)
 
 static WebWindowWatcher *_windowWatcher;
 static NSMutableSet *_pendingPageCacheToRelease = nil;
diff --git a/WebKit/History.subproj/WebHistoryItemPrivate.h b/WebKit/History.subproj/WebHistoryItemPrivate.h
index f860726..f6a23ec 100644
--- a/WebKit/History.subproj/WebHistoryItemPrivate.h
+++ b/WebKit/History.subproj/WebHistoryItemPrivate.h
@@ -8,8 +8,50 @@
 
 
 @interface WebHistoryItem (WebPrivate)
+- (void)_retainIconInDatabase:(BOOL)retain;
 + (void)_releaseAllPendingPageCaches;
 - (BOOL)hasPageCache;
 - (void)setHasPageCache: (BOOL)f;
 - (NSMutableDictionary *)pageCache;
+
++ (WebHistoryItem *)entryWithURL:(NSURL *)URL;
+
+- (id)initWithURL:(NSURL *)URL title:(NSString *)title;
+- (id)initWithURL:(NSURL *)URL target:(NSString *)target parent:(NSString *)parent title:(NSString *)title;
+
+- (NSDictionary *)dictionaryRepresentation;
+- (id)initFromDictionaryRepresentation:(NSDictionary *)dict;
+
+- (NSString *)parent;
+- (NSURL *)URL;
+- (NSString *)target;
+- (NSPoint)scrollPoint;
+- (NSArray *)documentState;
+- (BOOL)isTargetItem;
+- (NSData *)formData;
+- (NSString *)formContentType;
+- (NSString *)formReferrer;
+
+- (void)setURL:(NSURL *)URL;
+- (void)setOriginalURLString:(NSString *)URL;
+- (void)setTarget:(NSString *)target;
+- (void)setParent:(NSString *)parent;
+- (void)setTitle:(NSString *)title;
+- (void)setLastVisitedDate:(NSCalendarDate *)date;
+- (void)setScrollPoint:(NSPoint)p;
+- (void)setDocumentState:(NSArray *)state;
+- (void)setIsTargetItem:(BOOL)flag;
+- (void)setAnchor:(NSString *)anchor;
+- (void)setFormData:(NSData *)data;
+- (void)setFormContentType:(NSString *)type;
+- (void)setFormReferrer:(NSString *)referrer;
+
+- (NSArray *)children;
+- (void)addChildItem:(WebHistoryItem *)item;
+- (WebHistoryItem *)childItemWithName:(NSString *)name;
+- (WebHistoryItem *)targetItem;
+
+- (void)setAlwaysAttemptToUsePageCache: (BOOL)flag;
+- (BOOL)alwaysAttemptToUsePageCache;
+
 @end
diff --git a/WebKit/History.subproj/WebHistoryPrivate.h b/WebKit/History.subproj/WebHistoryPrivate.h
index ae6b2ac..e8d8ad2 100644
--- a/WebKit/History.subproj/WebHistoryPrivate.h
+++ b/WebKit/History.subproj/WebHistoryPrivate.h
@@ -41,5 +41,8 @@
 @end
 
 @interface WebHistory (WebPrivate)
+- (BOOL)loadHistory;
+- initWithFile: (NSString *)file;
+- (WebHistoryItem *)addEntryForURL: (NSURL *)URL;
 - (BOOL)containsEntryForURLString: (NSString *)URLString;
 @end
diff --git a/WebKit/History.subproj/WebHistoryPrivate.m b/WebKit/History.subproj/WebHistoryPrivate.m
index 079412c..9aa7a29 100644
--- a/WebKit/History.subproj/WebHistoryPrivate.m
+++ b/WebKit/History.subproj/WebHistoryPrivate.m
@@ -8,7 +8,8 @@
 
 #import "WebHistoryPrivate.h"
 
-#import "WebHistoryItem.h"
+#import <WebKit/WebHistoryItem.h>
+#import <WebKit/WebHistoryItemPrivate.h>
 #import <WebKit/WebKitLogging.h>
 
 #import <WebFoundation/WebNSCalendarDateExtras.h>
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 0013067..cff2d75 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -3395,6 +3395,9 @@
 			fileRef = F5B92B820223191D01C1A525;
 			isa = PBXBuildFile;
 			settings = {
+				ATTRIBUTES = (
+					Private,
+				);
 			};
 		};
 		F5B92B850223191D01C1A525 = {
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index 5d3d941..194f322 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -16,6 +16,7 @@
 @class WebError;
 @class WebFrame;
 @class WebResourceHandle;
+ at class WebPreferences;
 @class WebView;
 
 @protocol WebContextMenuDelegate;
@@ -372,4 +373,19 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
 */
 - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script;
 
+/*!
+    @method setPreferences:
+    @param preferences The preferences to use for the controller.
+    @abstract Override the standard setting for the controller. 
+*/
+- (void)setPreferences: (WebPreferences *)prefs;
+
+/*!
+    @method preferences
+    @result Returns the preferences used by this controller.
+    @discussion This method will return [WebPreferences standardPreferences] if no
+    other instance of WebPreferences has been set.
+*/
+- (WebPreferences *)preferences;
+
 @end
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index 86872fb..fd21bad 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -20,9 +20,11 @@
 #import <WebKit/WebFrame.h>
 #import <WebKit/WebFramePrivate.h>
 #import <WebKit/WebHistoryItem.h>
+#import <WebKit/WebHistoryItemPrivate.h>
 #import <WebKit/WebKitErrors.h>
 #import <WebKit/WebKitStatisticsPrivate.h>
 #import <WebKit/WebPluginDatabase.h>
+#import <WebKit/WebPreferences.h>
 #import <WebKit/WebResourceLoadDelegate.h>
 #import <WebKit/WebViewPrivate.h>
 #import <WebKit/WebWindowOperationsDelegate.h>
@@ -94,6 +96,18 @@ NSString *WebElementLinkTitleKey = 		@"WebElementLinkTitle";
     [super dealloc];
 }
 
+- (void)setPreferences: (WebPreferences *)prefs
+{
+    if (_private->preferences != prefs){
+        [_private->preferences release];
+        _private->preferences = [prefs retain];
+    }
+}
+
+- (WebPreferences *)preferences
+{
+    return _private->preferences ? _private->preferences : [WebPreferences standardPreferences];
+}
 
 - (void)setWindowOperationsDelegate:(id <WebWindowOperationsDelegate>)delegate
 {
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.h b/WebKit/WebView.subproj/WebControllerPrivate.h
index d828630..a7c159c 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.h
+++ b/WebKit/WebView.subproj/WebControllerPrivate.h
@@ -8,6 +8,7 @@
 
 @class WebError;
 @class WebFrame;
+ at class WebPreferences;
 @protocol WebFormDelegate;
 
 typedef enum { Safari, MacIE, WinIE } UserAgentStringType;
@@ -28,6 +29,8 @@ enum { NumUserAgentStringTypes = WinIE + 1 };
     
     id <WebContextMenuDelegate> defaultContextMenuDelegate;
 
+    WebPreferences *preferences;
+    
     WebBackForwardList *backForwardList;
     BOOL useBackForwardList;
     
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index fe8e4bb..23d5cdf 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -74,6 +74,8 @@
     [controllerSetName release];
     [topLevelFrameName release];
 
+    [preferences release];
+    
     [super dealloc];
 }
 
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 948d1c2..6b89afe 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -14,6 +14,7 @@
 #import <WebKit/WebFramePrivate.h>
 #import <WebKit/WebHistory.h>
 #import <WebKit/WebHistoryItem.h>
+#import <WebKit/WebHistoryItemPrivate.h>
 #import <WebKit/WebHTMLRepresentation.h>
 #import <WebKit/WebHTMLViewPrivate.h>
 #import <WebKit/WebIconDatabase.h>
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index d29f662..838def9 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -16,7 +16,7 @@
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebDocument.h>
 #import <WebKit/WebDynamicScrollBarsView.h>
-#import <WebKit/WebHistory.h>
+#import <WebKit/WebHistoryPrivate.h>
 #import <WebKit/WebHistoryItemPrivate.h>
 #import <WebKit/WebHTMLRepresentation.h>
 #import <WebKit/WebHTMLView.h>
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index 5d3d941..194f322 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -16,6 +16,7 @@
 @class WebError;
 @class WebFrame;
 @class WebResourceHandle;
+ at class WebPreferences;
 @class WebView;
 
 @protocol WebContextMenuDelegate;
@@ -372,4 +373,19 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
 */
 - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script;
 
+/*!
+    @method setPreferences:
+    @param preferences The preferences to use for the controller.
+    @abstract Override the standard setting for the controller. 
+*/
+- (void)setPreferences: (WebPreferences *)prefs;
+
+/*!
+    @method preferences
+    @result Returns the preferences used by this controller.
+    @discussion This method will return [WebPreferences standardPreferences] if no
+    other instance of WebPreferences has been set.
+*/
+- (WebPreferences *)preferences;
+
 @end
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 86872fb..fd21bad 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -20,9 +20,11 @@
 #import <WebKit/WebFrame.h>
 #import <WebKit/WebFramePrivate.h>
 #import <WebKit/WebHistoryItem.h>
+#import <WebKit/WebHistoryItemPrivate.h>
 #import <WebKit/WebKitErrors.h>
 #import <WebKit/WebKitStatisticsPrivate.h>
 #import <WebKit/WebPluginDatabase.h>
+#import <WebKit/WebPreferences.h>
 #import <WebKit/WebResourceLoadDelegate.h>
 #import <WebKit/WebViewPrivate.h>
 #import <WebKit/WebWindowOperationsDelegate.h>
@@ -94,6 +96,18 @@ NSString *WebElementLinkTitleKey = 		@"WebElementLinkTitle";
     [super dealloc];
 }
 
+- (void)setPreferences: (WebPreferences *)prefs
+{
+    if (_private->preferences != prefs){
+        [_private->preferences release];
+        _private->preferences = [prefs retain];
+    }
+}
+
+- (WebPreferences *)preferences
+{
+    return _private->preferences ? _private->preferences : [WebPreferences standardPreferences];
+}
 
 - (void)setWindowOperationsDelegate:(id <WebWindowOperationsDelegate>)delegate
 {
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index d828630..a7c159c 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -8,6 +8,7 @@
 
 @class WebError;
 @class WebFrame;
+ at class WebPreferences;
 @protocol WebFormDelegate;
 
 typedef enum { Safari, MacIE, WinIE } UserAgentStringType;
@@ -28,6 +29,8 @@ enum { NumUserAgentStringTypes = WinIE + 1 };
     
     id <WebContextMenuDelegate> defaultContextMenuDelegate;
 
+    WebPreferences *preferences;
+    
     WebBackForwardList *backForwardList;
     BOOL useBackForwardList;
     
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index fe8e4bb..23d5cdf 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -74,6 +74,8 @@
     [controllerSetName release];
     [topLevelFrameName release];
 
+    [preferences release];
+    
     [super dealloc];
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list