Skip to content

Commit

Permalink
Compile errors around pasteboard when importing more UIKit.
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=271424
rdar://125198774

Reviewed by Tim Horton and Aditya Keerthi.

Explicitly state that m_pasteboard is an AbstractPasteboard to deal with
compile errors arrising from importing more of UIKit.

* Source/WebCore/platform/PlatformPasteboard.h:

Canonical link: https://commits.webkit.org/276581@main
  • Loading branch information
megangardner committed Mar 23, 2024
1 parent a2bcc49 commit 6f4b9f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/WebCore/platform/PlatformPasteboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ OBJC_CLASS NSPasteboardItem;

#if PLATFORM(IOS_FAMILY)
OBJC_CLASS UIPasteboard;
OBJC_PROTOCOL(AbstractPasteboard);
#endif

#if USE(LIBWPE)
Expand Down Expand Up @@ -123,7 +124,7 @@ class PlatformPasteboard {
RetainPtr<NSPasteboard> m_pasteboard;
#endif
#if PLATFORM(IOS_FAMILY)
RetainPtr<id> m_pasteboard;
RetainPtr<AbstractPasteboard> m_pasteboard;
#endif
#if USE(LIBWPE)
struct wpe_pasteboard* m_pasteboard;
Expand Down
3 changes: 3 additions & 0 deletions Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
#define PASTEBOARD_SUPPORTS_ITEM_PROVIDERS (PLATFORM(IOS_FAMILY) && !(PLATFORM(WATCHOS) || PLATFORM(APPLETV)))
#define PASTEBOARD_SUPPORTS_PRESENTATION_STYLE_AND_TEAM_DATA (PASTEBOARD_SUPPORTS_ITEM_PROVIDERS && !PLATFORM(MACCATALYST))

@interface UIPasteboard () <AbstractPasteboard>
@end

namespace WebCore {

PlatformPasteboard::PlatformPasteboard()
Expand Down

0 comments on commit 6f4b9f9

Please sign in to comment.