Skip to content
Permalink
Browse files
Remove some extraneous PLATFORM(IOS_FAMILY) guards in WKContentViewIn…
…teraction

https://bugs.webkit.org/show_bug.cgi?id=219289

Reviewed by Sam Weinig.

Remove several redundant uses of `PLATFORM(IOS_FAMILY)`. The entire class is already conditional on
`IOS_FAMILY`, so adding additional compile-time guards for iOS family is not necessary.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setTimePickerValueToHour:minute:]):
(-[WKContentView timePickerValueHour]):
(-[WKContentView timePickerValueMinute]):


Canonical link: https://commits.webkit.org/231911@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
whsieh committed Nov 27, 2020
1 parent 8ce23a3 commit 879dac2bdaeeb6c2133e7af548709db257b71f36
Showing 3 changed files with 17 additions and 7 deletions.
@@ -1,3 +1,19 @@
2020-11-27 Wenson Hsieh <wenson_hsieh@apple.com>

Remove some extraneous PLATFORM(IOS_FAMILY) guards in WKContentViewInteraction
https://bugs.webkit.org/show_bug.cgi?id=219289

Reviewed by Sam Weinig.

Remove several redundant uses of `PLATFORM(IOS_FAMILY)`. The entire class is already conditional on
`IOS_FAMILY`, so adding additional compile-time guards for iOS family is not necessary.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setTimePickerValueToHour:minute:]):
(-[WKContentView timePickerValueHour]):
(-[WKContentView timePickerValueMinute]):

2020-11-27 Adrian Perez de Castro <aperez@igalia.com>

Non-unified build fixes, late November 2020 edition
@@ -438,9 +438,7 @@ struct WKAutoCorrectionData {
#if ENABLE(DRAG_SUPPORT)
, UIDragInteractionDelegate, UIDropInteractionDelegate
#endif
#if PLATFORM(IOS_FAMILY)
, WKTouchActionGestureRecognizerDelegate
#endif
>

@property (nonatomic, readonly) CGPoint lastInteractionLocation;
@@ -9107,27 +9107,23 @@ - (void)setTimePickerValueToHour:(NSInteger)hour minute:(NSInteger)minute
#if PLATFORM(WATCHOS)
if ([_presentedFullScreenInputViewController isKindOfClass:[WKTimePickerViewController class]])
[(WKTimePickerViewController *)_presentedFullScreenInputViewController.get() setHour:hour minute:minute];
#elif PLATFORM(IOS_FAMILY)
#else
if ([_inputPeripheral isKindOfClass:[WKDateTimeInputControl class]])
[(WKDateTimeInputControl *)_inputPeripheral.get() setTimePickerHour:hour minute:minute];
#endif
}

- (double)timePickerValueHour
{
#if PLATFORM(IOS_FAMILY)
if ([_inputPeripheral isKindOfClass:[WKDateTimeInputControl class]])
return [(WKDateTimeInputControl *)_inputPeripheral.get() timePickerValueHour];
#endif
return -1;
}

- (double)timePickerValueMinute
{
#if PLATFORM(IOS_FAMILY)
if ([_inputPeripheral isKindOfClass:[WKDateTimeInputControl class]])
return [(WKDateTimeInputControl *)_inputPeripheral.get() timePickerValueMinute];
#endif
return -1;
}

0 comments on commit 879dac2

Please sign in to comment.