Bug 206719 - WebCore: Remove iOS 11 macros from WebItemProviderPasteboard.h
Summary: WebCore: Remove iOS 11 macros from WebItemProviderPasteboard.h
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-23 17:15 PST by Jonathan Bedard
Modified: 2020-01-27 07:44 PST (History)
9 users (show)

See Also:


Attachments
Patch (1.27 KB, patch)
2020-01-23 17:22 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (1.44 KB, patch)
2020-01-23 17:55 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (1.42 KB, patch)
2020-01-24 07:58 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (1.43 KB, patch)
2020-01-24 08:06 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (1.34 KB, patch)
2020-01-24 12:06 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (1.30 KB, patch)
2020-01-24 15:09 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2020-01-23 17:15:05 PST
We don't need iOS 11 macros in WebItemProviderPasteboard since we are only building on iOS 13 and newer.
Comment 1 Jonathan Bedard 2020-01-23 17:22:42 PST
Created attachment 388625 [details]
Patch
Comment 2 Alexey Proskuryakov 2020-01-23 17:31:46 PST
Comment on attachment 388625 [details]
Patch

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

> Source/WebCore/platform/ios/WebItemProviderPasteboard.h:-30
> -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000

What makes this file iOS only? This would be a change for watchOS ad tvOS I think.
Comment 3 Jonathan Bedard 2020-01-23 17:40:27 PST
Comment on attachment 388625 [details]
Patch

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

>> Source/WebCore/platform/ios/WebItemProviderPasteboard.h:-30
>> -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000
> 
> What makes this file iOS only? This would be a change for watchOS ad tvOS I think.

Top of the file, line 26:

#if TARGET_OS_IPHONE
Comment 4 Tim Horton 2020-01-23 17:41:12 PST
(In reply to Jonathan Bedard from comment #3)
> Comment on attachment 388625 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=388625&action=review
> 
> >> Source/WebCore/platform/ios/WebItemProviderPasteboard.h:-30
> >> -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000
> > 
> > What makes this file iOS only? This would be a change for watchOS ad tvOS I think.
> 
> Top of the file, line 26:
> 
> #if TARGET_OS_IPHONE

Which means IOS_FAMILY
Comment 5 Jonathan Bedard 2020-01-23 17:43:14 PST
(In reply to Tim Horton from comment #4)
> (In reply to Jonathan Bedard from comment #3)
> > Comment on attachment 388625 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=388625&action=review
> > 
> > >> Source/WebCore/platform/ios/WebItemProviderPasteboard.h:-30
> > >> -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000
> > > 
> > > What makes this file iOS only? This would be a change for watchOS ad tvOS I think.
> > 
> > Top of the file, line 26:
> > 
> > #if TARGET_OS_IPHONE
> 
> Which means IOS_FAMILY

That's super confusing....guess we should replace that with a PLATFORM macro.
Comment 6 Jonathan Bedard 2020-01-23 17:55:20 PST
Created attachment 388630 [details]
Patch
Comment 7 Tim Horton 2020-01-23 17:56:49 PST
You can't do that, it's an SDK header.
Comment 8 Tim Horton 2020-01-23 17:57:09 PST
Perhaps you want TARGET_OS_IOS?
Comment 9 Jonathan Bedard 2020-01-24 07:58:30 PST
Created attachment 388692 [details]
Patch
Comment 10 Jonathan Bedard 2020-01-24 08:06:12 PST
Created attachment 388693 [details]
Patch
Comment 11 Tim Horton 2020-01-24 11:19:11 PST
Comment on attachment 388693 [details]
Patch

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

> Source/WebCore/platform/ios/WebItemProviderPasteboard.h:26
> +#if TARGET_OS_IPHONE && !TARGET_OS_WATCH && !TARGET_OS_TV

TARGET_OS_IOS probably still better but w/e
Comment 12 Jonathan Bedard 2020-01-24 12:06:33 PST
Created attachment 388716 [details]
Patch
Comment 13 Jonathan Bedard 2020-01-24 12:09:56 PST
(In reply to Tim Horton from comment #11)
> Comment on attachment 388693 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=388693&action=review
> 
> > Source/WebCore/platform/ios/WebItemProviderPasteboard.h:26
> > +#if TARGET_OS_IPHONE && !TARGET_OS_WATCH && !TARGET_OS_TV
> 
> TARGET_OS_IOS probably still better but w/e

Didn't realize that TARGET_OS_IOS included Catalyst, since the comments in TargetConditionals.h do not make that clear.
Comment 14 WebKit Commit Bot 2020-01-24 12:40:56 PST
Comment on attachment 388716 [details]
Patch

Clearing flags on attachment: 388716

Committed r255089: <https://trac.webkit.org/changeset/255089>
Comment 15 WebKit Commit Bot 2020-01-24 12:40:58 PST
All reviewed patches have been landed.  Closing bug.
Comment 16 Radar WebKit Bug Importer 2020-01-24 12:41:12 PST
<rdar://problem/58877638>
Comment 17 Ryan Haddad 2020-01-24 13:19:05 PST
Reverted r255089 for reason:

Breaks tvOS build.

Committed r255092: <https://trac.webkit.org/changeset/255092>
Comment 18 Wenson Hsieh 2020-01-24 13:42:49 PST
IIRC, TARGET_OS_IOS only covers iOS and iPadOS but not macCatalyst, where we also use WebItemProviderPasteboard SPI.
Comment 19 Jonathan Bedard 2020-01-24 13:46:09 PST
(In reply to Wenson Hsieh from comment #18)
> IIRC, TARGET_OS_IOS only covers iOS and iPadOS but not macCatalyst, where we
> also use WebItemProviderPasteboard SPI.

Tim and I dug into TargetConditionals.h. The comment about TARGET_OS_IOS doesn't say it targets Catalyst, but when you dig into where we define TARGET_OS_IOS, it ends up being set to 1 whenever MACCATALYST is set to 1.
Comment 20 Jonathan Bedard 2020-01-24 15:09:55 PST
Created attachment 388727 [details]
Patch
Comment 21 WebKit Commit Bot 2020-01-27 07:44:29 PST
Comment on attachment 388727 [details]
Patch

Clearing flags on attachment: 388727

Committed r255144: <https://trac.webkit.org/changeset/255144>
Comment 22 WebKit Commit Bot 2020-01-27 07:44:31 PST
All reviewed patches have been landed.  Closing bug.