Title: [287034] trunk/Source/WebKit
- Revision
- 287034
- Author
- [email protected]
- Date
- 2021-12-14 11:23:07 -0800 (Tue, 14 Dec 2021)
Log Message
Attachment does not update after markup.
https://bugs.webkit.org/show_bug.cgi?id=234266
Reviewed by Wenson Hsieh.
If we don't call the deligate to inform Mail about the new attachment data,
it will not update and the original image will be sent.
* UIProcess/mac/WKSharingServicePickerDelegate.mm:
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (287033 => 287034)
--- trunk/Source/WebKit/ChangeLog 2021-12-14 19:05:42 UTC (rev 287033)
+++ trunk/Source/WebKit/ChangeLog 2021-12-14 19:23:07 UTC (rev 287034)
@@ -1,3 +1,16 @@
+2021-12-14 Megan Gardner <[email protected]>
+
+ Attachment does not update after markup.
+ https://bugs.webkit.org/show_bug.cgi?id=234266
+
+ Reviewed by Wenson Hsieh.
+
+ If we don't call the deligate to inform Mail about the new attachment data,
+ it will not update and the original image will be sent.
+
+ * UIProcess/mac/WKSharingServicePickerDelegate.mm:
+ (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
+
2021-12-11 Dean Jackson <[email protected]>
Allow override of system's preferred color scheme
Modified: trunk/Source/WebKit/UIProcess/mac/WKSharingServicePickerDelegate.mm (287033 => 287034)
--- trunk/Source/WebKit/UIProcess/mac/WKSharingServicePickerDelegate.mm 2021-12-14 19:05:42 UTC (rev 287033)
+++ trunk/Source/WebKit/UIProcess/mac/WKSharingServicePickerDelegate.mm 2021-12-14 19:23:07 UTC (rev 287034)
@@ -148,13 +148,23 @@
NSItemProvider *itemProvider = (NSItemProvider *)item;
ALLOW_DEPRECATED_DECLARATIONS_BEGIN
- [itemProvider loadDataRepresentationForTypeIdentifier:(NSString *)kUTTypeData completionHandler:^(NSData *data, NSError *error) {
+ WeakPtr weakPage = _menuProxy->page();
+ [itemProvider loadDataRepresentationForTypeIdentifier:(NSString *)kUTTypeData completionHandler:[weakPage, attachmentID = _attachmentID](NSData *data, NSError *error) {
+ RefPtr webPage = weakPage.get();
+
+ if (!webPage)
+ return;
+
if (error)
return;
- auto apiAttachment = _menuProxy->page()->attachmentForIdentifier(_attachmentID);
+ auto apiAttachment = webPage->attachmentForIdentifier(attachmentID);
+ if (!apiAttachment)
+ return;
+
auto attachment = wrapper(apiAttachment);
[attachment setData:data newContentType:String(NSPasteboardTypeTIFF)];
+ webPage->didInvalidateDataForAttachment(*apiAttachment.get());
}];
ALLOW_DEPRECATED_DECLARATIONS_END
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes