Reviewed by Tim Omernick.
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Mar 2006 19:29:24 +0000 (19:29 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Mar 2006 19:29:24 +0000 (19:29 +0000)
        - fixed <rdar://problem/4475857> API: Setting a history item limit programmatically doesn't work

        * History/WebHistory.m:
        (-[WebHistoryPrivate _loadHistoryGuts:URL:error:]):
        use [self historyItemLimit], which prefers the explicitly-set value and falls back to the
        NSUserDefaults value, instead of using the NSUserDefaults value explicitly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13266 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/History/WebHistory.m

index 087053ed561c0c8702caa7b0e8eda0997e34c2a4..e0e78bacd3b3c3fb2349ce081985eec8045c54ef 100644 (file)
@@ -1,3 +1,14 @@
+2006-03-13  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Tim Omernick.
+        
+        - fixed <rdar://problem/4475857> API: Setting a history item limit programmatically doesn't work
+
+        * History/WebHistory.m:
+        (-[WebHistoryPrivate _loadHistoryGuts:URL:error:]):
+        use [self historyItemLimit], which prefers the explicitly-set value and falls back to the
+        NSUserDefaults value, instead of using the NSUserDefaults value explicitly.
+
 2006-03-10  Darin Adler  <darin@apple.com>
 
         Reviewed by Adele.
 2006-03-10  Darin Adler  <darin@apple.com>
 
         Reviewed by Adele.
index 9ae3903b6995a0618b630843170bf50658852340..2da1dd5efc9100e5e0f0e5cb8fbfa0cf0e0c4b83 100644 (file)
@@ -461,7 +461,7 @@ NSString *DatesArrayKey = @"WebHistoryDates";
 
     NSArray *array = [fileAsDictionary objectForKey:DatesArrayKey];
         
 
     NSArray *array = [fileAsDictionary objectForKey:DatesArrayKey];
         
-    int limit = [[NSUserDefaults standardUserDefaults] integerForKey: @"WebKitHistoryItemLimit"];
+    int limit = [self historyItemLimit];
     NSCalendarDate *ageLimitDate = [self _ageLimitDate];
     int index = 0;
     // reverse dates so you're loading the oldest first, to minimize the number of comparisons
     NSCalendarDate *ageLimitDate = [self _ageLimitDate];
     int index = 0;
     // reverse dates so you're loading the oldest first, to minimize the number of comparisons