Title: [159271] trunk/Source/WebKit
Revision
159271
Author
[email protected]
Date
2013-11-13 18:58:05 -0800 (Wed, 13 Nov 2013)

Log Message

Deprecate WebHistory methods that use NSCalendarDate
https://bugs.webkit.org/show_bug.cgi?id=124329
<rdar://problem/15441122>

Reviewed by Mark Rowe.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:
Add a shell script phase that uses unifdef to remove the __NSd_10_9 #define from
WebHistory on Mavericks.

Source/WebKit/mac:

* History/WebHistory.h:
Add NS_DEPRECATED_MAC to orderedLastVisitedDays and orderedItemsLastVisitedOnDay:.
In order to not break the Mountain Lion build, define __NSd_10_9 if necessary.

* History/WebHistory.mm:
Ignore deprecation warnings in methods where NSCalendarDate is used.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (159270 => 159271)


--- trunk/Source/WebKit/ChangeLog	2013-11-14 02:39:10 UTC (rev 159270)
+++ trunk/Source/WebKit/ChangeLog	2013-11-14 02:58:05 UTC (rev 159271)
@@ -1,3 +1,15 @@
+2013-11-13  Anders Carlsson  <[email protected]>
+
+        Deprecate WebHistory methods that use NSCalendarDate
+        https://bugs.webkit.org/show_bug.cgi?id=124329
+        <rdar://problem/15441122>
+
+        Reviewed by Mark Rowe.
+
+        * WebKit.xcodeproj/project.pbxproj:
+        Add a shell script phase that uses unifdef to remove the __NSd_10_9 #define from
+        WebHistory on Mavericks.
+
 2013-11-11  Alex Christensen  <[email protected]>
 
         Unreviewed build fix for Win64.

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (159270 => 159271)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2013-11-14 02:39:10 UTC (rev 159270)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2013-11-14 02:58:05 UTC (rev 159271)
@@ -1977,6 +1977,7 @@
 				1C6CB0510AA63EB000D23BFD /* Migrate Headers */,
 				939811300824BF01008DF038 /* Make Frameworks Symbolic Link */,
 				9398100D0824BF01008DF038 /* Headers */,
+				1A6D65BA18346ADD005AEDE9 /* Postprocess Headers */,
 				939810B20824BF01008DF038 /* Resources */,
 				939810BB0824BF01008DF038 /* Sources */,
 				1C395DE20C6BE8E0000D1E52 /* Generate 64-bit Export File */,
@@ -2045,6 +2046,21 @@
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
+		1A6D65BA18346ADD005AEDE9 /* Postprocess Headers */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/WebHistory.h",
+			);
+			name = "Postprocess Headers";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "cd \"${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}\"\n\nif [[ ${TARGET_MAC_OS_X_VERSION_MAJOR} == \"1080\" ]]; then\nUNIFDEF_OPTION=\"-U__NSd_10_9\";\nelse\nUNIFDEF_OPTION=\"-D__NSd_10_9\";\nfi\n\nfor HEADER in WebHistory.h; do\nunifdef -B ${UNIFDEF_OPTION} -o ${HEADER}.unifdef ${HEADER}\ncase $? in\n0)\nrm ${HEADER}.unifdef\n;;\n1)\nmv ${HEADER}{.unifdef,}\n;;\n*)\nexit 1\nesac\ndone\n";
+		};
 		1C395DE20C6BE8E0000D1E52 /* Generate 64-bit Export File */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;

Modified: trunk/Source/WebKit/mac/ChangeLog (159270 => 159271)


--- trunk/Source/WebKit/mac/ChangeLog	2013-11-14 02:39:10 UTC (rev 159270)
+++ trunk/Source/WebKit/mac/ChangeLog	2013-11-14 02:58:05 UTC (rev 159271)
@@ -1,3 +1,18 @@
+2013-11-13  Anders Carlsson  <[email protected]>
+
+        Deprecate WebHistory methods that use NSCalendarDate
+        https://bugs.webkit.org/show_bug.cgi?id=124329
+        <rdar://problem/15441122>
+
+        Reviewed by Mark Rowe.
+
+        * History/WebHistory.h:
+        Add NS_DEPRECATED_MAC to orderedLastVisitedDays and orderedItemsLastVisitedOnDay:.
+        In order to not break the Mountain Lion build, define __NSd_10_9 if necessary.
+        
+        * History/WebHistory.mm:
+        Ignore deprecation warnings in methods where NSCalendarDate is used.
+
 2013-11-13  Gordon Sheridan  <[email protected]>
 
         Removed deprecated download delegates.

Modified: trunk/Source/WebKit/mac/History/WebHistory.h (159270 => 159271)


--- trunk/Source/WebKit/mac/History/WebHistory.h	2013-11-14 02:39:10 UTC (rev 159270)
+++ trunk/Source/WebKit/mac/History/WebHistory.h	2013-11-14 02:58:05 UTC (rev 159271)
@@ -28,6 +28,10 @@
 
 #import <Foundation/Foundation.h>
 
+#ifndef __NSd_10_9
+#define __NSd_10_9 ,deprecated=10.9
+#endif
+
 @class NSError;
 
 @class WebHistoryItem;
@@ -116,7 +120,7 @@
     or more history items, ordered from most recent to oldest.
     @result Returns an array of NSCalendarDates for which history items exist in the WebHistory.
 */
-- (NSArray *)orderedLastVisitedDays;
+- (NSArray *)orderedLastVisitedDays NS_DEPRECATED_MAC(10_3, 10_9);
 
 /*!
     @method orderedItemsLastVisitedOnDay:
@@ -125,7 +129,7 @@
     @param calendarDate A date identifying the unique day of interest.
     @result Returns an array of WebHistoryItems last visited on the indicated day.
 */
-- (NSArray *)orderedItemsLastVisitedOnDay:(NSCalendarDate *)calendarDate;
+- (NSArray *)orderedItemsLastVisitedOnDay:(NSCalendarDate *)calendarDate NS_DEPRECATED_MAC(10_3, 10_9);
 
 /*!
     @method itemForURL:

Modified: trunk/Source/WebKit/mac/History/WebHistory.mm (159270 => 159271)


--- trunk/Source/WebKit/mac/History/WebHistory.mm	2013-11-14 02:39:10 UTC (rev 159270)
+++ trunk/Source/WebKit/mac/History/WebHistory.mm	2013-11-14 02:58:05 UTC (rev 159271)
@@ -92,7 +92,6 @@
 - (void)rebuildHistoryByDayIfNeeded:(WebHistory *)webHistory;
 
 - (NSArray *)orderedLastVisitedDays;
-- (NSArray *)orderedItemsLastVisitedOnDay:(NSCalendarDate *)calendarDate;
 - (BOOL)containsURL:(NSURL *)URL;
 - (WebHistoryItem *)itemForURL:(NSURL *)URL;
 - (WebHistoryItem *)itemForURLString:(NSString *)URLString;
@@ -101,8 +100,6 @@
 - (BOOL)loadFromURL:(NSURL *)URL collectDiscardedItemsInto:(NSMutableArray *)discardedItems error:(NSError **)error;
 - (BOOL)saveToURL:(NSURL *)URL error:(NSError **)error;
 
-- (NSCalendarDate *)ageLimitDate;
-
 - (void)setHistoryItemLimit:(int)limit;
 - (int)historyItemLimit;
 - (void)setHistoryAgeInDaysLimit:(int)limit;
@@ -432,6 +429,9 @@
 
 // MARK: DATE-BASED RETRIEVAL
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
 - (NSArray *)orderedLastVisitedDays
 {
     if (!_orderedLastVisitedDays) {
@@ -462,6 +462,8 @@
     return _entriesByDate->get(dateKey).get();
 }
 
+#pragma clang diagnostic pop
+
 // MARK: URL MATCHING
 
 - (WebHistoryItem *)itemForURLString:(NSString *)URLString
@@ -512,6 +514,9 @@
     return [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitHistoryItemLimit"];
 }
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
 // Return a date that marks the age limit for history entries saved to or
 // loaded from disk. Any entry older than this item should be rejected.
 - (NSCalendarDate *)ageLimitDate
@@ -520,6 +525,8 @@
                                                       hours:0 minutes:0 seconds:0];
 }
 
+#pragma clang diagnostic pop
+
 - (BOOL)loadHistoryGutsFromURL:(NSURL *)URL savedItemsCount:(int *)numberOfItemsLoaded collectDiscardedItemsInto:(NSMutableArray *)discardedItems error:(NSError **)error
 {
     *numberOfItemsLoaded = 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to