Title: [237648] trunk/Source/WebKit
- Revision
- 237648
- Author
- [email protected]
- Date
- 2018-10-31 13:16:49 -0700 (Wed, 31 Oct 2018)
Log Message
API test WKAttachmentTests.CopyAndPasteBetweenWebViews fails on macOS 10.13
https://bugs.webkit.org/show_bug.cgi?id=191114
<rdar://problem/45700410>
Reviewed by Dean Jackson.
On macOS 10.12, we don't attempt secure archival at all because SECURE_ARCHIVER_API is turned off, and on macOS
10.14, NSFileWrapper supports secure coding. However, on macOS 10.13, SECURE_ARCHIVER_API is on despite
NSFileWrapper not being securely codable, so we're unable to serialize attachment data.
To fix this, we only use the secure archiver on ≥ macOS 10.14 and ≥ iOS 12.
* UIProcess/API/Cocoa/APIAttachmentCocoa.mm:
(API::Attachment::createSerializedRepresentation const):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (237647 => 237648)
--- trunk/Source/WebKit/ChangeLog 2018-10-31 20:08:43 UTC (rev 237647)
+++ trunk/Source/WebKit/ChangeLog 2018-10-31 20:16:49 UTC (rev 237648)
@@ -1,3 +1,20 @@
+2018-10-31 Wenson Hsieh <[email protected]>
+
+ API test WKAttachmentTests.CopyAndPasteBetweenWebViews fails on macOS 10.13
+ https://bugs.webkit.org/show_bug.cgi?id=191114
+ <rdar://problem/45700410>
+
+ Reviewed by Dean Jackson.
+
+ On macOS 10.12, we don't attempt secure archival at all because SECURE_ARCHIVER_API is turned off, and on macOS
+ 10.14, NSFileWrapper supports secure coding. However, on macOS 10.13, SECURE_ARCHIVER_API is on despite
+ NSFileWrapper not being securely codable, so we're unable to serialize attachment data.
+
+ To fix this, we only use the secure archiver on ≥ macOS 10.14 and ≥ iOS 12.
+
+ * UIProcess/API/Cocoa/APIAttachmentCocoa.mm:
+ (API::Attachment::createSerializedRepresentation const):
+
2018-10-31 Zach Li <[email protected]>
Add credit card autofill button
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/APIAttachmentCocoa.mm (237647 => 237648)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/APIAttachmentCocoa.mm 2018-10-31 20:08:43 UTC (rev 237647)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/APIAttachmentCocoa.mm 2018-10-31 20:16:49 UTC (rev 237648)
@@ -36,6 +36,8 @@
#endif
#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
+#define CAN_SECURELY_ARCHIVE_FILE_WRAPPER (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000)
+
namespace API {
static WTF::String mimeTypeInferredFromFileExtension(const API::Attachment& attachment)
@@ -132,7 +134,12 @@
if (!m_fileWrapper || !m_webPage)
return nullptr;
+#if CAN_SECURELY_ARCHIVE_FILE_WRAPPER
NSData *serializedData = securelyArchivedDataWithRootObject(m_fileWrapper.get());
+#else
+ NSData *serializedData = insecurelyArchivedDataWithRootObject(m_fileWrapper.get());
+#endif
+
if (!serializedData)
return nullptr;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes