| Summary: | Make enum values consistent in ApplicationManifest::Icon::Purpose and _WKApplicationManifestIconPurpose | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | rginsberg | ||||||
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | bfulgham, rginsberg, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | Safari 15 | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
rginsberg
2021-12-02 09:54:24 PST
Created attachment 445744 [details]
Patch
Comment on attachment 445744 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=445744&action=review This looks fine, but I suggest following the model of the underling WebCore type and use the bitwise-shift to show the mask values. > Source/WebKit/UIProcess/API/Cocoa/_WKApplicationManifest.h:46 > + _WKApplicationManifestIconPurposeAny = 1, We should follow the behavior of the WebCore::ApplicationManifest::Icon::Purpose enum: _WKApplicationManifestIconPurposeAny = (1 << 0), > Source/WebKit/UIProcess/API/Cocoa/_WKApplicationManifest.h:47 > + _WKApplicationManifestIconPurposeMonochrome = 2, _WKApplicationManifestIconPurposeMonochrome = (1 << 1), > Source/WebKit/UIProcess/API/Cocoa/_WKApplicationManifest.h:48 > + _WKApplicationManifestIconPurposeMaskable = 4, _WKApplicationManifestIconPurposeMaskable = (1 << 2), Created attachment 445778 [details]
Patch
(In reply to Brent Fulgham from comment #3) > Comment on attachment 445744 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=445744&action=review > > This looks fine, but I suggest following the model of the underling WebCore > type and use the bitwise-shift to show the mask values. > > > Source/WebKit/UIProcess/API/Cocoa/_WKApplicationManifest.h:46 > > + _WKApplicationManifestIconPurposeAny = 1, > > We should follow the behavior of the > WebCore::ApplicationManifest::Icon::Purpose enum: > > _WKApplicationManifestIconPurposeAny = (1 << 0), > > > Source/WebKit/UIProcess/API/Cocoa/_WKApplicationManifest.h:47 > > + _WKApplicationManifestIconPurposeMonochrome = 2, > > _WKApplicationManifestIconPurposeMonochrome = (1 << 1), > > > Source/WebKit/UIProcess/API/Cocoa/_WKApplicationManifest.h:48 > > + _WKApplicationManifestIconPurposeMaskable = 4, > > _WKApplicationManifestIconPurposeMaskable = (1 << 2), Thanks! Just uploaded a patch that uses this model Comment on attachment 445778 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=445778&action=review r=me > Source/WebKit/UIProcess/API/Cocoa/_WKApplicationManifest.h:48 > + _WKApplicationManifestIconPurposeMaskable = (1 << 2), Thank you for adjusting this! I'll cq+ this change once EWS finishes. Committed r286470 (244810@main): <https://commits.webkit.org/244810@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 445778 [details]. |