Title: [111798] trunk/Source/WebKit/mac
Revision
111798
Author
benja...@webkit.org
Date
2012-03-22 17:51:14 -0700 (Thu, 22 Mar 2012)

Log Message

Build fix for WebHistory is busted after changing time zone
https://bugs.webkit.org/show_bug.cgi?id=81849

Unreviewed build fix.

When generating warning for undefined message signature, rebuildHistoryByDayIfNeeded
fail to compile due to addItemToDateCaches: being undefined.

Move the definition to the right place in the file to use the private method. 

Patch by Benjamin Poulain <bpoul...@apple.com> on 2012-03-22

* History/WebHistory.mm:
(-[WebHistoryPrivate rebuildHistoryByDayIfNeeded:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (111797 => 111798)


--- trunk/Source/WebKit/mac/ChangeLog	2012-03-23 00:51:06 UTC (rev 111797)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-03-23 00:51:14 UTC (rev 111798)
@@ -1,5 +1,20 @@
 2012-03-22  Benjamin Poulain  <bpoul...@apple.com>
 
+        Build fix for WebHistory is busted after changing time zone
+        https://bugs.webkit.org/show_bug.cgi?id=81849
+
+        Unreviewed build fix.
+
+        When generating warning for undefined message signature, rebuildHistoryByDayIfNeeded
+        fail to compile due to addItemToDateCaches: being undefined.
+
+        Move the definition to the right place in the file to use the private method. 
+
+        * History/WebHistory.mm:
+        (-[WebHistoryPrivate rebuildHistoryByDayIfNeeded:]):
+
+2012-03-22  Benjamin Poulain  <bpoul...@apple.com>
+
         WebHistory is busted after changing time zone
         https://bugs.webkit.org/show_bug.cgi?id=81849
 

Modified: trunk/Source/WebKit/mac/History/WebHistory.mm (111797 => 111798)


--- trunk/Source/WebKit/mac/History/WebHistory.mm	2012-03-23 00:51:06 UTC (rev 111797)
+++ trunk/Source/WebKit/mac/History/WebHistory.mm	2012-03-23 00:51:14 UTC (rev 111798)
@@ -90,6 +90,7 @@
 - (BOOL)removeItem:(WebHistoryItem *)entry;
 - (BOOL)removeItems:(NSArray *)entries;
 - (BOOL)removeAllItems;
+- (void)rebuildHistoryByDayIfNeeded:(WebHistory *)webHistory;
 
 - (NSArray *)orderedLastVisitedDays;
 - (NSArray *)orderedItemsLastVisitedOnDay:(NSCalendarDate *)calendarDate;
@@ -125,32 +126,6 @@
             nil]];    
 }
 
-- (void)rebuildHistoryByDayIfNeeded:(WebHistory *)webHistory
-{
-    // We clear all the values to present a consistent state when sending the notifications.
-    // We keep a reference to the entries for rebuilding the history after the notification.
-    Vector <RetainPtr<NSMutableArray> > entryArrays;
-    copyValuesToVector(*_entriesByDate, entryArrays);
-    _entriesByDate->clear();
-
-    NSMutableDictionary *entriesByURL = _entriesByURL;
-    _entriesByURL = nil;
-
-    [_orderedLastVisitedDays release];
-    _orderedLastVisitedDays = nil;
-
-    NSArray *allEntries = [entriesByURL allValues];
-    [webHistory _sendNotification:WebHistoryAllItemsRemovedNotification entries:allEntries];
-
-    // Next, we rebuild the history, restore the states, and notify the clients.
-    _entriesByURL = entriesByURL;
-    for (size_t dayIndex = 0; dayIndex < entryArrays.size(); ++dayIndex) {
-        for (WebHistoryItem *entry in (entryArrays[dayIndex]).get())
-            [self addItemToDateCaches:entry];
-    }
-    [webHistory _sendNotification:WebHistoryItemsAddedNotification entries:allEntries];
-}
-
 - (id)init
 {
     self = [super init];
@@ -373,6 +348,32 @@
     return YES;
 }
 
+- (void)rebuildHistoryByDayIfNeeded:(WebHistory *)webHistory
+{
+    // We clear all the values to present a consistent state when sending the notifications.
+    // We keep a reference to the entries for rebuilding the history after the notification.
+    Vector <RetainPtr<NSMutableArray> > entryArrays;
+    copyValuesToVector(*_entriesByDate, entryArrays);
+    _entriesByDate->clear();
+    
+    NSMutableDictionary *entriesByURL = _entriesByURL;
+    _entriesByURL = nil;
+    
+    [_orderedLastVisitedDays release];
+    _orderedLastVisitedDays = nil;
+    
+    NSArray *allEntries = [entriesByURL allValues];
+    [webHistory _sendNotification:WebHistoryAllItemsRemovedNotification entries:allEntries];
+    
+    // Next, we rebuild the history, restore the states, and notify the clients.
+    _entriesByURL = entriesByURL;
+    for (size_t dayIndex = 0; dayIndex < entryArrays.size(); ++dayIndex) {
+        for (WebHistoryItem *entry in (entryArrays[dayIndex]).get())
+            [self addItemToDateCaches:entry];
+    }
+    [webHistory _sendNotification:WebHistoryItemsAddedNotification entries:allEntries];
+}
+
 - (BOOL)removeItem:(WebHistoryItem *)entry
 {
     NSString *URLString = [entry URLString];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to