Modified: trunk/Source/WebKit/ChangeLog (227764 => 227765)
--- trunk/Source/WebKit/ChangeLog 2018-01-30 01:20:17 UTC (rev 227764)
+++ trunk/Source/WebKit/ChangeLog 2018-01-30 01:27:18 UTC (rev 227765)
@@ -1,3 +1,19 @@
+2018-01-29 Alex Christensen <[email protected]>
+
+ Clean up API after bugs 178240 and 176474
+ https://bugs.webkit.org/show_bug.cgi?id=182259
+
+ Reviewed by Dan Bernstein.
+
+ NS_OPTIONS should be NSUInteger, not NSInteger. This is how all other NS_OPTIONS in WebKit are,
+ and it's necessary if we get really big numbers as options. Changing them won't cause binary
+ incompatibility unless someone does signed integer comparison with currently invalid values.
+
+ Added availability macros I forgot to add earlier.
+
+ * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
+ * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+
2018-01-29 Jiewen Tan <[email protected]>
[WebAuthN] Add a compile-time feature flag
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h (227764 => 227765)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2018-01-30 01:20:17 UTC (rev 227764)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2018-01-30 01:27:18 UTC (rev 227765)
@@ -70,7 +70,7 @@
_WKPlugInUnavailabilityReasonInsecurePluginVersion
} WK_API_AVAILABLE(macosx(WK_MAC_TBA));
-typedef NS_OPTIONS(NSInteger, _WKAutoplayEventFlags) {
+typedef NS_OPTIONS(NSUInteger, _WKAutoplayEventFlags) {
_WKAutoplayEventFlagsNone = 0,
_WKAutoplayEventFlagsHasAudio = 1 << 0,
} WK_API_AVAILABLE(macosx(WK_MAC_TBA));
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h (227764 => 227765)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h 2018-01-30 01:20:17 UTC (rev 227764)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h 2018-01-30 01:27:18 UTC (rev 227765)
@@ -42,7 +42,7 @@
_WKPaginationModeBottomToTop,
} WK_API_AVAILABLE(macosx(10.10), ios(8.0));
-typedef NS_OPTIONS(NSInteger, _WKMediaCaptureState) {
+typedef NS_OPTIONS(NSUInteger, _WKMediaCaptureState) {
_WKMediaCaptureStateNone = 0,
_WKMediaCaptureStateActiveMicrophone = 1 << 0,
_WKMediaCaptureStateActiveCamera = 1 << 1,
@@ -50,7 +50,7 @@
_WKMediaCaptureStateMutedCamera = 1 << 3,
} WK_API_AVAILABLE(macosx(10.13), ios(11.0));
-typedef NS_OPTIONS(NSInteger, _WKMediaMutedState) {
+typedef NS_OPTIONS(NSUInteger, _WKMediaMutedState) {
_WKMediaNoneMuted = 0,
_WKMediaAudioMuted = 1 << 0,
_WKMediaCaptureDevicesMuted = 1 << 1,
@@ -85,7 +85,7 @@
_WKImmediateActionTelLink
} WK_API_AVAILABLE(macosx(10.12));
-typedef NS_OPTIONS(NSInteger, _WKRectEdge) {
+typedef NS_OPTIONS(NSUInteger, _WKRectEdge) {
_WKRectEdgeNone = 0,
_WKRectEdgeLeft = 1 << CGRectMinXEdge,
_WKRectEdgeTop = 1 << CGRectMinYEdge,
@@ -254,8 +254,8 @@
#else
-@property (nonatomic, readonly) _WKRectEdge _pinnedState;
-@property (nonatomic, setter=_setRubberBandingEnabled:) _WKRectEdge _rubberBandingEnabled;
+@property (nonatomic, readonly) _WKRectEdge _pinnedState WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+@property (nonatomic, setter=_setRubberBandingEnabled:) _WKRectEdge _rubberBandingEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA));
@property (readonly) NSColor *_pageExtendedBackgroundColor;
@property (nonatomic, setter=_setDrawsBackground:) BOOL _drawsBackground;
@@ -424,7 +424,7 @@
- (BOOL)_tryToSwipeWithEvent:(NSEvent *)event ignoringPinnedState:(BOOL)ignoringPinnedState WK_API_AVAILABLE(macosx(WK_MAC_TBA));
- (void)_setDidMoveSwipeSnapshotCallback:(void(^)(CGRect))callback WK_API_AVAILABLE(macosx(WK_MAC_TBA));
@property (nonatomic, setter=_setTotalHeightOfBanners:) CGFloat _totalHeightOfBanners WK_API_AVAILABLE(macosx(WK_MAC_TBA));
-@property (nonatomic, copy, setter=_setUnderlayColor:) NSColor *_underlayColor;
+@property (nonatomic, copy, setter=_setUnderlayColor:) NSColor *_underlayColor WK_API_AVAILABLE(macosx(WK_MAC_TBA));
@property (nonatomic, readwrite, setter=_setIgnoresNonWheelEvents:) BOOL _ignoresNonWheelEvents WK_API_AVAILABLE(macosx(WK_MAC_TBA));
@property (nonatomic, readonly) WKPageRef _pageRefForTransitionToWKWebView WK_API_AVAILABLE(macosx(WK_MAC_TBA));
@property (nonatomic, readonly) BOOL _hasActiveVideoForControlsManager WK_API_AVAILABLE(macosx(10.12));
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h (227764 => 227765)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h 2018-01-30 01:20:17 UTC (rev 227764)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h 2018-01-30 01:27:18 UTC (rev 227765)
@@ -41,7 +41,7 @@
#include <wtf/WeakPtr.h>
#include <wtf/text/WTFString.h>
-using _WKRectEdge = NSInteger;
+using _WKRectEdge = NSUInteger;
OBJC_CLASS NSAccessibilityRemoteUIElement;
OBJC_CLASS NSImmediateActionGestureRecognizer;
Modified: trunk/Tools/ChangeLog (227764 => 227765)
--- trunk/Tools/ChangeLog 2018-01-30 01:20:17 UTC (rev 227764)
+++ trunk/Tools/ChangeLog 2018-01-30 01:27:18 UTC (rev 227765)
@@ -1,3 +1,14 @@
+2018-01-29 Alex Christensen <[email protected]>
+
+ Clean up API after bugs 178240 and 176474
+ https://bugs.webkit.org/show_bug.cgi?id=182259
+
+ Reviewed by Dan Bernstein.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
+ (TEST):
+ (-[PinnedStateObserver observeValueForKeyPath:ofObject:change:context:]):
+
2018-01-29 Jiewen Tan <[email protected]>
[WebAuthN] Add a compile-time feature flag
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm (227764 => 227765)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm 2018-01-30 01:20:17 UTC (rev 227764)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm 2018-01-30 01:27:18 UTC (rev 227765)
@@ -585,7 +585,7 @@
EXPECT_TRUE([keyPath isEqualToString:NSStringFromSelector(@selector(_pinnedState))]);
EXPECT_TRUE([[object class] isEqual:[TestWKWebView class]]);
EXPECT_EQ([[change objectForKey:NSKeyValueChangeOldKey] integerValue], _WKRectEdgeAll);
- EXPECT_EQ([[change objectForKey:NSKeyValueChangeNewKey] integerValue], _WKRectEdgeLeft | _WKRectEdgeRight);
+ EXPECT_EQ([[change objectForKey:NSKeyValueChangeNewKey] unsignedIntegerValue], _WKRectEdgeLeft | _WKRectEdgeRight);
EXPECT_TRUE(context == nullptr);
done = true;
}