Bug 237986

Summary: Don't build WebPageProxy::writePromisedAttachmentToPasteboard() and its IPC on macOS
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, kkinnunen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=237839
Attachments:
Description Flags
Patch
none
Patch none

Chris Dumez
Reported 2022-03-16 15:26:45 PDT
Don't build WebPageProxy::writePromisedAttachmentToPasteboard() and its IPC on macOS since it is only useful on iOS.
Attachments
Patch (3.46 KB, patch)
2022-03-16 15:29 PDT, Chris Dumez
no flags
Patch (4.26 KB, patch)
2022-03-16 15:50 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2022-03-16 15:29:15 PDT
Brent Fulgham
Comment 2 2022-03-16 15:42:23 PDT
Comment on attachment 454903 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=454903&action=review > Source/WebKit/UIProcess/WebPageProxy.cpp:10196 > +#if PLATFORM(IOS_FAMILY) It seems like this message is only ever used on iOS/iPadOS (_writePromisedAttachmentToPasteboard is a no-op on watchOS/tvOS), so it might be possible to remove the message entirely on tvOS/watchOS (though perhaps not worth doing).
Brent Fulgham
Comment 3 2022-03-16 15:44:02 PDT
Comment on attachment 454903 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=454903&action=review > Source/WebKit/UIProcess/WebPageProxy.h:2546 > void writePromisedAttachmentToPasteboard(WebCore::PromisedAttachmentInfo&&, const String& authorizationToken); You could probably make this change to "PageClient" as well, so it would avoid compiling another virtual method on macOS.
Chris Dumez
Comment 4 2022-03-16 15:48:32 PDT
(In reply to Brent Fulgham from comment #2) > Comment on attachment 454903 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=454903&action=review > > > Source/WebKit/UIProcess/WebPageProxy.cpp:10196 > > +#if PLATFORM(IOS_FAMILY) > > It seems like this message is only ever used on iOS/iPadOS > (_writePromisedAttachmentToPasteboard is a no-op on watchOS/tvOS), so it > might be possible to remove the message entirely on tvOS/watchOS (though > perhaps not worth doing). Based on the IPC sender, the condition is PLATFORM(IOS_FAMILY) && ENABLE(ATTACHMENT_ELEMENT). It matches what I have here on recipient side.
Chris Dumez
Comment 5 2022-03-16 15:50:46 PDT
Chris Dumez
Comment 6 2022-03-16 15:51:52 PDT
(In reply to Brent Fulgham from comment #3) > Comment on attachment 454903 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=454903&action=review > > > Source/WebKit/UIProcess/WebPageProxy.h:2546 > > void writePromisedAttachmentToPasteboard(WebCore::PromisedAttachmentInfo&&, const String& authorizationToken); > > You could probably make this change to "PageClient" as well, so it would > avoid compiling another virtual method on macOS. Good idea, done.
Brent Fulgham
Comment 7 2022-03-16 16:58:15 PDT
Comment on attachment 454904 [details] Patch r=me
EWS
Comment 8 2022-03-16 17:56:43 PDT
Committed r291381 (248512@main): <https://commits.webkit.org/248512@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 454904 [details].
Radar WebKit Bug Importer
Comment 9 2022-03-16 17:57:17 PDT
Note You need to log in before you can comment on or make changes to this bug.