Some builds are broken after r239262
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Dec 2018 02:25:25 +0000 (02:25 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Dec 2018 02:25:25 +0000 (02:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=192777

Reviewed by Simon Fraser.

Source/WebKit:

* Platform/spi/ios/AccessibilitySupportSPI.h:
* UIProcess/Cocoa/WKFullKeyboardAccessWatcher.h:
* UIProcess/Cocoa/WKFullKeyboardAccessWatcher.mm:
(platformIsFullKeyboardAccessEnabled):
(-[WKFullKeyboardAccessWatcher init]):
Fix the build by being more clear about when it's OK to use AccessibilitySupport.

Source/WTF:

* wtf/Platform.h:

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

Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebKit/ChangeLog
Source/WebKit/Platform/spi/ios/AccessibilitySupportSPI.h
Source/WebKit/UIProcess/Cocoa/WKFullKeyboardAccessWatcher.h
Source/WebKit/UIProcess/Cocoa/WKFullKeyboardAccessWatcher.mm

index 09eab30..f54952c 100644 (file)
@@ -1,3 +1,12 @@
+2018-12-17  Chris Fleizach  <cfleizach@apple.com>
+
+        Some builds are broken after r239262
+        https://bugs.webkit.org/show_bug.cgi?id=192777
+
+        Reviewed by Simon Fraser.
+
+        * wtf/Platform.h:
+
 2018-12-17  Daniel Bates  <dabates@apple.com>
 
         Support concatenating StringView with other string types
index 7cff637..b859f4a 100644 (file)
 /* FIXME: Is this still necessary? CFURLConnection isn't used on Cocoa platforms any more. */
 #define ENABLE_SEC_ITEM_SHIM 1
 #endif
+
+#if (PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400))
+#define HAVE_ACCESSIBILITY_SUPPORT 1
+#endif
+
+#if PLATFORM(MAC)
+#define ENABLE_FULL_KEYBOARD_ACCESS 1
+#endif
index 782f81f..2deddaa 100644 (file)
@@ -1,3 +1,17 @@
+2018-12-17  Chris Fleizach  <cfleizach@apple.com>
+
+        Some builds are broken after r239262
+        https://bugs.webkit.org/show_bug.cgi?id=192777
+
+        Reviewed by Simon Fraser.
+
+        * Platform/spi/ios/AccessibilitySupportSPI.h:
+        * UIProcess/Cocoa/WKFullKeyboardAccessWatcher.h:
+        * UIProcess/Cocoa/WKFullKeyboardAccessWatcher.mm:
+        (platformIsFullKeyboardAccessEnabled):
+        (-[WKFullKeyboardAccessWatcher init]):
+        Fix the build by being more clear about when it's OK to use AccessibilitySupport.
+
 2018-12-17  Chris Dumez  <cdumez@apple.com>
 
         Allow passing nil as session state to [WKWebView _restoreSessionState:]
index b4b0053..50ca2db 100644 (file)
 
 #pragma once
 
+#if HAVE(ACCESSIBILITY_SUPPORT)
+
 #if USE(APPLE_INTERNAL_SDK)
+
 // FIXME (46432011): We shouldn't need to wrap this include in extern "C".
 WTF_EXTERN_C_BEGIN
 #include <AccessibilitySupport.h>
 WTF_EXTERN_C_END
-#endif
+
+#else
 
 WTF_EXTERN_C_BEGIN
 
+#if PLATFORM(IOS_FAMILY)
 extern Boolean _AXSKeyRepeatEnabled();
 extern CFTimeInterval _AXSKeyRepeatDelay();
+#endif
+
+#if ENABLE(ACCESSIBILITY_EVENTS)
 extern CFStringRef kAXSWebAccessibilityEventsEnabledNotification;
 extern Boolean _AXSWebAccessibilityEventsEnabled();
+#endif
+
+#if PLATFORM(IOS_FAMILY) && ENABLE(FULL_KEYBOARD_ACCESS)
 extern CFStringRef kAXSFullKeyboardAccessEnabledNotification;
 extern Boolean _AXSFullKeyboardAccessEnabled();
+#endif
 
 WTF_EXTERN_C_END
+
+#endif
+
+#endif // HAVE(ACCESSIBILITY_SUPPORT)
index d296362..9d11052 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if PLATFORM(COCOA)
+#if ENABLE(FULL_KEYBOARD_ACCESS)
 
 @interface WKFullKeyboardAccessWatcher : NSObject {
 @private
@@ -36,4 +36,4 @@
 
 @end;
 
-#endif // PLATFORM(COCOA)
+#endif // ENABLE(FULL_KEYBOARD_ACCESS)
index bac842e..5d13fb0 100644 (file)
@@ -26,7 +26,7 @@
 #import "config.h"
 #import "WKFullKeyboardAccessWatcher.h"
 
-#if PLATFORM(COCOA)
+#if ENABLE(FULL_KEYBOARD_ACCESS)
 
 #import "WebProcessPool.h"
 
@@ -55,7 +55,7 @@ static inline BOOL platformIsFullKeyboardAccessEnabled()
         // Bit 1 is set if controls other than text fields are included in the tab order (WebKit also always includes lists).
         fullKeyboardAccessEnabled = (mode & 0x2);
     }
-#elif PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000
+#elif PLATFORM(IOS_FAMILY)
     fullKeyboardAccessEnabled = _AXSFullKeyboardAccessEnabled();
 #endif
     
@@ -92,7 +92,7 @@ static inline BOOL platformIsFullKeyboardAccessEnabled()
 #if PLATFORM(MAC)
     notificationCenter = [NSDistributedNotificationCenter defaultCenter];
     notitificationName = KeyboardUIModeDidChangeNotification;
-#elif PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000
+#elif PLATFORM(IOS_FAMILY)
     notificationCenter = [NSNotificationCenter defaultCenter];
     notitificationName = (NSString *)kAXSFullKeyboardAccessEnabledNotification;
 #endif
@@ -111,4 +111,4 @@ static inline BOOL platformIsFullKeyboardAccessEnabled()
 
 @end
 
-#endif // PLATFORM(COCOA)
+#endif // ENABLE(FULL_KEYBOARD_ACCESS)