Title: [281278] trunk/Source
- Revision
- 281278
- Author
- akeer...@apple.com
- Date
- 2021-08-19 16:13:51 -0700 (Thu, 19 Aug 2021)
Log Message
Remove __has_include guard for _UIDatePickerOverlayPresentation
https://bugs.webkit.org/show_bug.cgi?id=227298
rdar://79970171
Reviewed by Tim Horton.
Source/WebKit:
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/forms/WKDateTimeInputControl.mm:
(-[WKDateTimePicker showDateTimePicker]):
Source/WTF:
* wtf/PlatformHave.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (281277 => 281278)
--- trunk/Source/WTF/ChangeLog 2021-08-19 23:02:50 UTC (rev 281277)
+++ trunk/Source/WTF/ChangeLog 2021-08-19 23:13:51 UTC (rev 281278)
@@ -1,3 +1,13 @@
+2021-08-19 Aditya Keerthi <akeer...@apple.com>
+
+ Remove __has_include guard for _UIDatePickerOverlayPresentation
+ https://bugs.webkit.org/show_bug.cgi?id=227298
+ rdar://79970171
+
+ Reviewed by Tim Horton.
+
+ * wtf/PlatformHave.h:
+
2021-08-19 David Kilzer <ddkil...@apple.com>
[WTF] Fix static analyzer warnings for clang tidy bugprone-move-forwarding-reference checker
Modified: trunk/Source/WTF/wtf/PlatformHave.h (281277 => 281278)
--- trunk/Source/WTF/wtf/PlatformHave.h 2021-08-19 23:02:50 UTC (rev 281277)
+++ trunk/Source/WTF/wtf/PlatformHave.h 2021-08-19 23:13:51 UTC (rev 281278)
@@ -1038,6 +1038,7 @@
#if (PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000
#define HAVE_UICONTEXTMENU_STYLE_CUSTOM_PRESENTATION 1
#define HAVE_UIDATEPICKER_INSETS 1
+#define HAVE_UIDATEPICKER_OVERLAY_PRESENTATION 1
#define HAVE_UIMENUOPTIONS_SINGLE_SELECTION 1
#endif
@@ -1086,11 +1087,6 @@
#define HAVE_QUICKLOOK_PREVIEW_ACTIVITY 1
#endif
-// FIXME: Replace the __has_include check with a version check once internal bots are updated (webkit.org/b/227298).
-#if PLATFORM(IOS_FAMILY) && defined __has_include && __has_include(<UIKit/_UIDatePickerOverlayPresentation.h>)
-#define HAVE_UIDATEPICKER_OVERLAY_PRESENTATION 1
-#endif
-
#if PLATFORM(IOS) || PLATFORM(MACCATALYST)
#define HAVE_UITOOLBAR_STANDARD_APPEARANCE 1
#endif
Modified: trunk/Source/WebKit/ChangeLog (281277 => 281278)
--- trunk/Source/WebKit/ChangeLog 2021-08-19 23:02:50 UTC (rev 281277)
+++ trunk/Source/WebKit/ChangeLog 2021-08-19 23:13:51 UTC (rev 281278)
@@ -1,3 +1,15 @@
+2021-08-19 Aditya Keerthi <akeer...@apple.com>
+
+ Remove __has_include guard for _UIDatePickerOverlayPresentation
+ https://bugs.webkit.org/show_bug.cgi?id=227298
+ rdar://79970171
+
+ Reviewed by Tim Horton.
+
+ * Platform/spi/ios/UIKitSPI.h:
+ * UIProcess/ios/forms/WKDateTimeInputControl.mm:
+ (-[WKDateTimePicker showDateTimePicker]):
+
2021-08-19 Alex Christensen <achristen...@webkit.org>
Use Vector<SandboxExtension::Handle> instead of SandboxExtension::HandleArray
Modified: trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h (281277 => 281278)
--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2021-08-19 23:02:50 UTC (rev 281277)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2021-08-19 23:13:51 UTC (rev 281278)
@@ -108,6 +108,10 @@
#import <UIKit/UIContextMenuInteraction_Private.h>
#endif
+#if HAVE(UIDATEPICKER_OVERLAY_PRESENTATION)
+#import <UIKit/_UIDatePickerOverlayPresentation.h>
+#endif
+
#if ENABLE(DRAG_SUPPORT)
#import <UIKit/NSItemProvider+UIKitAdditions_Private.h>
#endif
@@ -222,6 +226,28 @@
- (UIEdgeInsets)_appliedInsetsToEdgeOfContent;
@end
+#if HAVE(UIDATEPICKER_OVERLAY_PRESENTATION)
+
+typedef NS_ENUM(NSInteger, _UIDatePickerOverlayAnchor) {
+ _UIDatePickerOverlayAnchorSourceRect = 2
+};
+
+@interface _UIDatePickerOverlayPresentation : NSObject
+
+- (instancetype)initWithSourceView:(UIView *)sourceView;
+- (void)presentDatePicker:(UIDatePicker *)datePicker onDismiss:(void(^)(BOOL retargeted))dismissHandler;
+- (void)dismissPresentationAnimated:(BOOL)animated;
+
+@property (nonatomic, weak, readonly) UIView *sourceView;
+@property (nonatomic, assign) CGRect sourceRect;
+@property (nonatomic, assign) _UIDatePickerOverlayAnchor overlayAnchor;
+@property (nonatomic, strong) UIView *accessoryView;
+@property (nonatomic, assign) BOOL accessoryViewIgnoresDefaultInsets;
+
+@end
+
+#endif
+
@interface UIDevice ()
- (void)setOrientation:(UIDeviceOrientation)orientation animated:(BOOL)animated;
@property (nonatomic, readonly, retain) NSString *buildVersion;
@@ -1454,30 +1480,6 @@
@end
#endif
-#if HAVE(UIDATEPICKER_OVERLAY_PRESENTATION)
-
-// FIXME: Import the header directly once bots are updated to a build containing rdar://78779655.
-
-typedef NS_ENUM(NSInteger, _UIDatePickerOverlayAnchor) {
- _UIDatePickerOverlayAnchorSourceRect = 2
-};
-
-@interface _UIDatePickerOverlayPresentation : NSObject
-
-- (instancetype)initWithSourceView:(UIView *)sourceView;
-- (void)presentDatePicker:(UIDatePicker *)datePicker onDismiss:(void(^)(BOOL retargeted))dismissHandler;
-- (void)dismissPresentationAnimated:(BOOL)animated;
-
-@property (nonatomic, weak, readonly) UIView *sourceView;
-@property (nonatomic, assign) CGRect sourceRect;
-@property (nonatomic, assign) _UIDatePickerOverlayAnchor overlayAnchor;
-@property (nonatomic, strong) UIView *accessoryView;
-@property (nonatomic, assign) BOOL accessoryViewIgnoresDefaultInsets;
-
-@end
-
-#endif
-
WTF_EXTERN_C_BEGIN
BOOL UIKeyboardEnabledInputModesAllowOneToManyShortcuts(void);
Modified: trunk/Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm (281277 => 281278)
--- trunk/Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm 2021-08-19 23:02:50 UTC (rev 281277)
+++ trunk/Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm 2021-08-19 23:13:51 UTC (rev 281278)
@@ -501,10 +501,8 @@
[_datePickerPresentation setSourceRect:_view.focusedElementInformation.interactionRect];
[_datePickerPresentation setAccessoryView:_accessoryView.get()];
[_datePickerPresentation setAccessoryViewIgnoresDefaultInsets:YES];
+ [_datePickerPresentation setOverlayAnchor:_UIDatePickerOverlayAnchorSourceRect];
- if ([_datePickerPresentation respondsToSelector:@selector(setOverlayAnchor:)])
- [_datePickerPresentation setOverlayAnchor:_UIDatePickerOverlayAnchorSourceRect];
-
[_datePickerPresentation presentDatePicker:_datePicker.get() onDismiss:[weakSelf = WeakObjCPtr<WKDateTimePicker>(self)](BOOL) {
if (auto strongSelf = weakSelf.get())
[strongSelf handleDatePickerPresentationDismissal];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes