Bug 221156 - [macOS] Remove support for image controls
Summary: [macOS] Remove support for image controls
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-01-29 14:01 PST by Wenson Hsieh
Modified: 2021-01-30 10:48 PST (History)
17 users (show)

See Also:


Attachments
For EWS (86.11 KB, patch)
2021-01-29 16:04 PST, Wenson Hsieh
thorton: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (88.24 KB, patch)
2021-01-29 19:44 PST, Wenson Hsieh
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (85.05 KB, patch)
2021-01-30 08:31 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2021-01-29 14:01:38 PST
Remove support for image controls
Comment 1 Wenson Hsieh 2021-01-29 16:04:31 PST
Created attachment 418780 [details]
For EWS
Comment 2 Tim Horton 2021-01-29 16:19:20 PST
Comment on attachment 418780 [details]
For EWS

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

> Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:100
> -@property (nonatomic, setter=_setImageControlsEnabled:) BOOL _imageControlsEnabled WK_API_AVAILABLE(macos(10.12));
> +@property (nonatomic, setter=_setImageControlsEnabled:) BOOL _imageControlsEnabled WK_API_DEPRECATED("Image controls are no longer supported", macos(10.12, WK_MAC_TBA));

Don't we have pretty strong evidence that we can just delete this?
Comment 3 Wenson Hsieh 2021-01-29 16:50:27 PST
Comment on attachment 418780 [details]
For EWS

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

>> Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:100
>> +@property (nonatomic, setter=_setImageControlsEnabled:) BOOL _imageControlsEnabled WK_API_DEPRECATED("Image controls are no longer supported", macos(10.12, WK_MAC_TBA));
> 
> Don't we have pretty strong evidence that we can just delete this?

Ah, so after some more digging, it looks like Mail actually turns on this SPI for some of their web views, but then never attempts to set the corresponding attribute (x-webkit-imagemenu) on any image elements. When using web inspector to manually add the attribute, I'm able to get a button to show up when hovering over images, but it doesn't have any effect.

As such, it seems that use of this SPI by Mail was unintentional, so while we can't remove the SPI quite yet, marking it as deprecated is probably a good first step.
Comment 4 Wenson Hsieh 2021-01-29 19:44:41 PST
Created attachment 418803 [details]
Patch
Comment 5 EWS 2021-01-29 21:27:38 PST
commit-queue failed to commit attachment 418803 [details] to WebKit repository.
Comment 6 Wenson Hsieh 2021-01-30 08:31:09 PST
Created attachment 418815 [details]
Patch for landing
Comment 7 EWS 2021-01-30 10:47:49 PST
Committed r272117: <https://trac.webkit.org/changeset/272117>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 418815 [details].
Comment 8 Radar WebKit Bug Importer 2021-01-30 10:48:13 PST
<rdar://problem/73794193>