Bug 207398

Summary: Handle deprecated APIs in WKImagePreviewViewController
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, krollin, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Jonathan Bedard 2020-02-07 12:06:03 PST
We are using some deprecated APIs in WKImagePreviewViewController and we need to allow them.

Not sure how our OpenSource build is working at the moment.
Comment 1 Jonathan Bedard 2020-02-07 12:08:09 PST
Created attachment 390114 [details]
Patch
Comment 2 WebKit Commit Bot 2020-02-07 13:45:56 PST
Comment on attachment 390114 [details]
Patch

Clearing flags on attachment: 390114

Committed r256057: <https://trac.webkit.org/changeset/256057>
Comment 3 WebKit Commit Bot 2020-02-07 13:45:57 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2020-02-07 13:46:14 PST
<rdar://problem/59272048>
Comment 5 Alexey Proskuryakov 2020-02-08 13:01:43 PST
Comment on attachment 390114 [details]
Patch

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

> Source/WebKit/UIProcess/WKImagePreviewViewController.mm:98
> +ALLOW_DEPRECATED_DECLARATIONS_BEGIN
>  ALLOW_DEPRECATED_IMPLEMENTATIONS_BEGIN
>  - (NSArray<UIPreviewAction *> *)previewActionItems

Why is this right? Surely there is no need for ALLOW_DEPRECATED_DECLARATIONS_BEGIN around previewActionItems, because it's not even a declaration.
Comment 6 Tim Horton 2020-02-08 15:10:54 PST
Comment on attachment 390114 [details]
Patch

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

>> Source/WebKit/UIProcess/WKImagePreviewViewController.mm:98
>>  - (NSArray<UIPreviewAction *> *)previewActionItems
> 
> Why is this right? Surely there is no need for ALLOW_DEPRECATED_DECLARATIONS_BEGIN around previewActionItems, because it's not even a declaration.

It could definitely be tighter (it's about things inside the method body), but also doesn't really matter?
Comment 7 Alexey Proskuryakov 2020-02-08 17:09:23 PST
Usually these annotate code that needs rework. If we don't care about precisely identifying such code, it would be easier to just disable deprecation warnings for the whole project.

Or are you saying that everything between these lines needs to be reworked?
Comment 8 Tim Horton 2020-02-08 17:34:55 PST
(In reply to Alexey Proskuryakov from comment #7)
> Usually these annotate code that needs rework. If we don't care about
> precisely identifying such code, it would be easier to just disable
> deprecation warnings for the whole project.
> 
> Or are you saying that everything between these lines needs to be reworked?

More than half, anyway.
Comment 9 Tim Horton 2020-02-08 17:35:50 PST
(In reply to Alexey Proskuryakov from comment #7)
> Usually these annotate code that needs rework. If we don't care about
> precisely identifying such code, it would be easier to just disable
> deprecation warnings for the whole project.

Also, it's ... 10 lines. This seems a little unnecessarily melodramatic :)
Comment 10 Alexey Proskuryakov 2020-02-08 17:59:02 PST
Excuses.