Bug 201967 - Remove some support for < iOS 13
Summary: Remove some support for < iOS 13
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-18 20:18 PDT by Keith Rollin
Modified: 2019-09-21 22:28 PDT (History)
9 users (show)

See Also:


Attachments
Patch (30.14 KB, patch)
2019-09-19 19:26 PDT, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2019-09-18 20:18:02 PDT
Remove some support for iOS versions less than 13.0. 

Update conditionals that reference __IPHONE_OS_VERSION_MIN_REQUIRED and __IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have values >= 130000. This means that expressions like "__IPHONE_OS_VERSION_MIN_REQUIRED < 101300" are always False and "__IPHONE_OS_VERSION_MIN_REQUIRED >= 101300" are always True.

After version checks have been removed, there are some cases where the preprocessor conditional looks like "#if PLATFORM(MAC) || PLATFORM(IOS_FAMILY)". These can be collapsed into "#if PLATFORM(COCOA)". This additional cleanup will be performed in a subsequent patch.

This removal is part of a series of patches effecting the removal of dead code for old versions of iOS. This particular pass involves changes in which Andy Estes was involved. These changes are isolated from other similar changes in order to facilitate the reviewing process.
Comment 1 Radar WebKit Bug Importer 2019-09-18 20:18:17 PDT
<rdar://problem/55504738>
Comment 2 Keith Rollin 2019-09-18 21:11:21 PDT
> These can be collapsed into "#if PLATFORM(COCOA)". 

Actually, in somme cases, even this check can be removed if in a Cocoa-only file.
Comment 3 Keith Rollin 2019-09-19 19:26:50 PDT
Created attachment 379190 [details]
Patch
Comment 4 Andy Estes 2019-09-20 12:27:29 PDT
Comment on attachment 379190 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=379190&action=review

> Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm:78
> -#if PLATFORM(MAC) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
> +#if PLATFORM(MAC) || PLATFORM(IOS_FAMILY)

I think this is equivalent to PLATFORM(COCOA), in which case it can be removed.
Comment 5 Andy Estes 2019-09-20 12:28:52 PDT
(In reply to Andy Estes from comment #4)
> Comment on attachment 379190 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=379190&action=review
> 
> > Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm:78
> > -#if PLATFORM(MAC) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
> > +#if PLATFORM(MAC) || PLATFORM(IOS_FAMILY)
> 
> I think this is equivalent to PLATFORM(COCOA), in which case it can be
> removed.

Oh, you said you'd squash up in a subsequent patch (but I still think you can remove in this case :))
Comment 6 Keith Rollin 2019-09-20 12:47:10 PDT
Yeah, I know it's simple to squash these things into PLATFORM(COCOA) or remove them altogether in Cocoa-only files. But I have a lot of patches in this series with lots of details to keep track of, and I really don't want to stray from the process I have set up to make sure I don't drop anything or distract me from the steps I'm on now.
Comment 7 WebKit Commit Bot 2019-09-20 15:20:02 PDT
Comment on attachment 379190 [details]
Patch

Clearing flags on attachment: 379190

Committed r250160: <https://trac.webkit.org/changeset/250160>
Comment 8 WebKit Commit Bot 2019-09-20 15:20:03 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Darin Adler 2019-09-21 22:28:14 PDT
Comment on attachment 379190 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=379190&action=review

> Source/WTF/ChangeLog:21
> +        After version checks have been removed, there are some cases where the
> +        preprocessor conditional looks like "#if PLATFORM(MAC) ||
> +        PLATFORM(IOS_FAMILY)". These can be collapsed into "#if
> +        PLATFORM(COCOA)". This additional cleanup will be performed in a
> +        subsequent patch.

Depending on which source file they are in, they can be removed entirely rather than collapsed into "#if PLATFORM(COCOA)". Our Objective-C and Objective-C++ source files don’t compile on non-Cocoa platforms, so we don’t need conditionals in them.
Comment 10 Darin Adler 2019-09-21 22:28:34 PDT
Oh, I see your comment saying that above, Keith.