Title: [291381] trunk/Source/WebKit
Revision
291381
Author
cdu...@apple.com
Date
2022-03-16 17:55:31 -0700 (Wed, 16 Mar 2022)

Log Message

Don't build WebPageProxy::writePromisedAttachmentToPasteboard() and its IPC on macOS
https://bugs.webkit.org/show_bug.cgi?id=237986

Reviewed by Brent Fulgham.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::writePromisedAttachmentToPasteboard):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (291380 => 291381)


--- trunk/Source/WebKit/ChangeLog	2022-03-17 00:39:04 UTC (rev 291380)
+++ trunk/Source/WebKit/ChangeLog	2022-03-17 00:55:31 UTC (rev 291381)
@@ -1,3 +1,15 @@
+2022-03-16  Chris Dumez  <cdu...@apple.com>
+
+        Don't build WebPageProxy::writePromisedAttachmentToPasteboard() and its IPC on macOS
+        https://bugs.webkit.org/show_bug.cgi?id=237986
+
+        Reviewed by Brent Fulgham.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::writePromisedAttachmentToPasteboard):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+
 2022-03-16  Brent Fulgham  <bfulg...@apple.com>
 
         CoreIPC Hardening: Add user gesture check when saving images

Modified: trunk/Source/WebKit/UIProcess/PageClient.h (291380 => 291381)


--- trunk/Source/WebKit/UIProcess/PageClient.h	2022-03-17 00:39:04 UTC (rev 291380)
+++ trunk/Source/WebKit/UIProcess/PageClient.h	2022-03-17 00:55:31 UTC (rev 291381)
@@ -619,7 +619,9 @@
     virtual void didInsertAttachment(API::Attachment&, const String& source) { }
     virtual void didRemoveAttachment(API::Attachment&) { }
     virtual void didInvalidateDataForAttachment(API::Attachment&) { }
+#if PLATFORM(IOS_FAMILY)
     virtual void writePromisedAttachmentToPasteboard(WebCore::PromisedAttachmentInfo&&) { }
+#endif
 #if PLATFORM(COCOA)
     virtual NSFileWrapper *allocFileWrapperInstance() const { return nullptr; }
     virtual NSSet *serializableFileWrapperClasses() const { return nullptr; }

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (291380 => 291381)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2022-03-17 00:39:04 UTC (rev 291380)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2022-03-17 00:55:31 UTC (rev 291381)
@@ -10193,17 +10193,14 @@
 
 #if ENABLE(ATTACHMENT_ELEMENT)
 
+#if PLATFORM(IOS_FAMILY)
 void WebPageProxy::writePromisedAttachmentToPasteboard(WebCore::PromisedAttachmentInfo&& info, const String& authorizationToken)
 {
-#if PLATFORM(IOS_FAMILY)
     MESSAGE_CHECK(m_process, isValidPerformActionOnElementAuthorizationToken(authorizationToken));
 
     pageClient().writePromisedAttachmentToPasteboard(WTFMove(info));
-#else
-    UNUSED_PARAM(info);
-    UNUSED_PARAM(authorizationToken);
+}
 #endif
-}
 
 void WebPageProxy::requestAttachmentIcon(const String& identifier, const String& contentType, const String& fileName, const String& title, const FloatSize& requestedSize)
 {

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (291380 => 291381)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.h	2022-03-17 00:39:04 UTC (rev 291380)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h	2022-03-17 00:55:31 UTC (rev 291381)
@@ -2542,8 +2542,9 @@
     Ref<API::Attachment> ensureAttachment(const String& identifier);
     void invalidateAllAttachments();
 
-        
+#if PLATFORM(IOS_FAMILY)
     void writePromisedAttachmentToPasteboard(WebCore::PromisedAttachmentInfo&&, const String& authorizationToken);
+#endif
 
     void requestAttachmentIcon(const String& identifier, const String& type, const String& path, const String& title, const WebCore::FloatSize&);
 

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in (291380 => 291381)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in	2022-03-17 00:39:04 UTC (rev 291380)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in	2022-03-17 00:55:31 UTC (rev 291381)
@@ -525,7 +525,9 @@
     DidInsertAttachmentWithIdentifier(String identifier, String source, bool hasEnclosingImage)
     DidRemoveAttachmentWithIdentifier(String identifier)
     SerializedAttachmentDataForIdentifiers(Vector<String> identifiers) -> (Vector<WebCore::SerializedAttachmentData> seralizedData) Synchronous
+#if PLATFORM(IOS_FAMILY)
     WritePromisedAttachmentToPasteboard(struct WebCore::PromisedAttachmentInfo info, String authorizationToken)
+#endif
     RequestAttachmentIcon(String identifier, String contentType, String path, String title, WebCore::FloatSize size)
 #endif
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to