Title: [226279] trunk/Source/WTF
Revision
226279
Author
wenson_hs...@apple.com
Date
2017-12-22 14:53:07 -0800 (Fri, 22 Dec 2017)

Log Message

Unreviewed, try to fix the Sierra build after r226277.

The macOS 10.12 SDK does not know about NSControlStateValue and some types of NSLevelIndicatorStyles, so these
need to be declared in a separate section in AppKitCompatibilityDeclarations.h (rather than in the < macOS 10.12
SDK #ifdef).

* wtf/mac/AppKitCompatibilityDeclarations.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (226278 => 226279)


--- trunk/Source/WTF/ChangeLog	2017-12-22 22:34:18 UTC (rev 226278)
+++ trunk/Source/WTF/ChangeLog	2017-12-22 22:53:07 UTC (rev 226279)
@@ -1,5 +1,15 @@
 2017-12-22  Wenson Hsieh  <wenson_hs...@apple.com>
 
+        Unreviewed, try to fix the Sierra build after r226277.
+
+        The macOS 10.12 SDK does not know about NSControlStateValue and some types of NSLevelIndicatorStyles, so these
+        need to be declared in a separate section in AppKitCompatibilityDeclarations.h (rather than in the < macOS 10.12
+        SDK #ifdef).
+
+        * wtf/mac/AppKitCompatibilityDeclarations.h:
+
+2017-12-22  Wenson Hsieh  <wenson_hs...@apple.com>
+
         Fix build failures due to using deprecated AppKit symbols
         https://bugs.webkit.org/show_bug.cgi?id=181110
         <rdar://problem/36162865>

Modified: trunk/Source/WTF/wtf/mac/AppKitCompatibilityDeclarations.h (226278 => 226279)


--- trunk/Source/WTF/wtf/mac/AppKitCompatibilityDeclarations.h	2017-12-22 22:34:18 UTC (rev 226278)
+++ trunk/Source/WTF/wtf/mac/AppKitCompatibilityDeclarations.h	2017-12-22 22:53:07 UTC (rev 226279)
@@ -28,28 +28,20 @@
 
 #import <Availability.h>
 
+#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101300
+#import <AppKit/AppKit.h>
+#endif
+
 #if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
 
-#import <AppKit/AppKit.h>
-
 static const NSAlertStyle NSAlertStyleCritical = NSCriticalAlertStyle;
 static const NSAlertStyle NSAlertStyleInformational = NSInformationalAlertStyle;
 static const NSAlertStyle NSAlertStyleWarning = NSWarningAlertStyle;
 
-typedef NSInteger NSControlStateValue;
-static const NSControlStateValue NSControlStateValueMixed = NSMixedState;
-static const NSControlStateValue NSControlStateValueOff = NSOffState;
-static const NSControlStateValue NSControlStateValueOn = NSOnState;
-
 static const NSBezelStyle NSBezelStyleShadowlessSquare = NSShadowlessSquareBezelStyle;
 static const NSBezelStyle NSBezelStyleRounded = NSRoundedBezelStyle;
 static const NSBezelStyle NSBezelStyleRoundedDisclosure = NSRoundedDisclosureBezelStyle;
 
-static const NSLevelIndicatorStyle NSLevelIndicatorStyleRelevancy = NSRelevancyLevelIndicatorStyle;
-static const NSLevelIndicatorStyle NSLevelIndicatorStyleContinuousCapacity = NSContinuousCapacityLevelIndicatorStyle;
-static const NSLevelIndicatorStyle NSLevelIndicatorStyleDiscreteCapacity = NSDiscreteCapacityLevelIndicatorStyle;
-static const NSLevelIndicatorStyle NSLevelIndicatorStyleRating = NSRatingLevelIndicatorStyle;
-
 static const NSButtonType NSButtonTypeMomentaryLight = NSMomentaryLightButton;
 static const NSButtonType NSButtonTypePushOnPushOff = NSPushOnPushOffButton;
 static const NSButtonType NSButtonTypeToggle = NSToggleButton;
@@ -134,6 +126,20 @@
 static const NSWindowStyleMask NSWindowStyleMaskTitled = NSTitledWindowMask;
 static const NSWindowStyleMask NSWindowStyleMaskUtilityWindow = NSUtilityWindowMask;
 
-#endif
+#endif // __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
 
+#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101300
+
+typedef NSInteger NSControlStateValue;
+static const NSControlStateValue NSControlStateValueMixed = NSMixedState;
+static const NSControlStateValue NSControlStateValueOff = NSOffState;
+static const NSControlStateValue NSControlStateValueOn = NSOnState;
+
+static const NSLevelIndicatorStyle NSLevelIndicatorStyleRelevancy = NSRelevancyLevelIndicatorStyle;
+static const NSLevelIndicatorStyle NSLevelIndicatorStyleContinuousCapacity = NSContinuousCapacityLevelIndicatorStyle;
+static const NSLevelIndicatorStyle NSLevelIndicatorStyleDiscreteCapacity = NSDiscreteCapacityLevelIndicatorStyle;
+static const NSLevelIndicatorStyle NSLevelIndicatorStyleRating = NSRatingLevelIndicatorStyle;
+
+#endif // __MAC_OS_X_VERSION_MAX_ALLOWED < 101300
+
 #endif // AppKitCompatibilityDeclarations_h
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to