Bug 206719

Summary: WebCore: Remove iOS 11 macros from WebItemProviderPasteboard.h
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: WebCore Misc.Assignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, darin, krollin, ryanhaddad, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=206096
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

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.