summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2019-09-11 12:48:16 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2019-10-04 07:23:41 +0000
commitf10c33b221fa3576a9389c2dda871b4f6851e2c1 (patch)
tree0f2fc45e65f5bb65e15556fd4f01f3ec0800eb4e
parent24e27a843be434fa2a0e7a047e118d55317f0c4d (diff)
downloadqtwebengine-chromium-f10c33b221fa3576a9389c2dda871b4f6851e2c1.tar.gz
Fix building on macOS after 77 merge
Change-Id: I09006e7ddf8852c3955b90b504706c0e77f8d126 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--chromium/base/mac/foundation_util.h5
-rw-r--r--chromium/components/remote_cocoa/app_shim/bridged_content_view.mm18
-rw-r--r--chromium/ui/base/clipboard/BUILD.gn3
3 files changed, 22 insertions, 4 deletions
diff --git a/chromium/base/mac/foundation_util.h b/chromium/base/mac/foundation_util.h
index 19dc0892b5b..1f68e581ed7 100644
--- a/chromium/base/mac/foundation_util.h
+++ b/chromium/base/mac/foundation_util.h
@@ -53,7 +53,10 @@ typedef CR_FORWARD_ENUM(unsigned int, NSSearchPathDirectory);
typedef unsigned int NSSearchPathDomainMask;
#endif
-#if defined(OS_IOS) || defined(MAC_OS_X_VERSION_10_15)
+// The SECTYPE check is a workaround for a presumably wrong macOS SDK detection.
+// This macro was removed from Security.framework of the 10.15 SDK:
+// http://codeworkshop.net/objc-diff/sdkdiffs/macos/10.15/Security.html at SecBase.h
+#if defined(OS_IOS) || (defined(MAC_OS_X_VERSION_10_15) && !defined(SECTYPE))
typedef struct CF_BRIDGED_TYPE(id) __SecCertificate* SecCertificateRef;
typedef struct CF_BRIDGED_TYPE(id) __SecKey* SecKeyRef;
typedef struct CF_BRIDGED_TYPE(id) __SecPolicy* SecPolicyRef;
diff --git a/chromium/components/remote_cocoa/app_shim/bridged_content_view.mm b/chromium/components/remote_cocoa/app_shim/bridged_content_view.mm
index 4d4b3a5d675..0b09af43a23 100644
--- a/chromium/components/remote_cocoa/app_shim/bridged_content_view.mm
+++ b/chromium/components/remote_cocoa/app_shim/bridged_content_view.mm
@@ -15,8 +15,10 @@
#import "components/remote_cocoa/app_shim/native_widget_ns_window_bridge.h"
#include "components/remote_cocoa/app_shim/native_widget_ns_window_host_helper.h"
#include "components/remote_cocoa/common/native_widget_ns_window_host.mojom.h"
+#include "ui/base/clipboard/clipboard_constants.h"
#import "ui/base/cocoa/appkit_utils.h"
#include "ui/base/cocoa/cocoa_base_utils.h"
+#import "ui/base/dragdrop/cocoa_dnd_util.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/dragdrop/os_exchange_data_provider_mac.h"
#include "ui/base/ime/input_method.h"
@@ -84,6 +86,18 @@ ui::TextEditCommand GetTextEditCommandForMenuAction(SEL action) {
return ui::TextEditCommand::INVALID_COMMAND;
}
+#if defined(TOOLKIT_QT)
+// Copy of ui::OSExchangeDataProviderMac::SupportedPasteboardTypes() (ui/base/dragdrop/os_exchange_data_provider_mac.mm)
+NSArray* SupportedPasteboardTypes() {
+ return @[
+ ui::kWebCustomDataPboardType, ui::ClipboardUtil::UTIForWebURLsAndTitles(),
+ NSURLPboardType, NSFilenamesPboardType, ui::kChromeDragDummyPboardType,
+ NSStringPboardType, NSHTMLPboardType, NSRTFPboardType,
+ NSFilenamesPboardType, ui::kWebCustomDataPboardType, NSPasteboardTypeString
+ ];
+}
+#endif
+
} // namespace
@interface BridgedContentView ()
@@ -192,8 +206,12 @@ ui::TextEditCommand GetTextEditCommandForMenuAction(SEL action) {
// Initialize the focus manager with the correct keyboard accessibility
// setting.
[self updateFullKeyboardAccess];
+#if !defined(TOOLKIT_QT)
[self registerForDraggedTypes:ui::OSExchangeDataProviderMac::
SupportedPasteboardTypes()];
+#else
+ [self registerForDraggedTypes:SupportedPasteboardTypes()];
+#endif
}
return self;
}
diff --git a/chromium/ui/base/clipboard/BUILD.gn b/chromium/ui/base/clipboard/BUILD.gn
index 97d9626e786..daa8b5f4de0 100644
--- a/chromium/ui/base/clipboard/BUILD.gn
+++ b/chromium/ui/base/clipboard/BUILD.gn
@@ -40,7 +40,6 @@ jumbo_component("clipboard_types") {
]
} else if (is_mac) {
sources -= [
- "clipboard_constants_mac.mm",
"clipboard_format_type_mac.mm",
]
}
@@ -135,8 +134,6 @@ jumbo_component("clipboard") {
sources -= [
"clipboard_mac.h",
"clipboard_mac.mm",
- "clipboard_util_mac.h",
- "clipboard_util_mac.mm",
]
} else if (is_win) {
sources -= [