Diff
Modified: branches/safari-614.1.8-branch/Source/WebCore/ChangeLog (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebCore/ChangeLog 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebCore/ChangeLog 2022-03-31 21:31:32 UTC (rev 292179)
@@ -1,5 +1,84 @@
2022-03-31 Russell Epstein <[email protected]>
+ Cherry-pick r291978. rdar://problem/90497026
+
+ Some Apple internal clients fail to build due to redeclared AppKit types in WebKitLegacy
+ https://bugs.webkit.org/show_bug.cgi?id=238368
+
+ Patch by Ian Anderson <[email protected]> on 2022-03-28
+ Reviewed by Jonathan Bedard.
+
+ Source/WebCore:
+
+ Some Apple internal Mac Catalyst clients need to use both AppKit and
+ WebKitLegacy. WebKitLegacy's redeclaration of AppKit types causes errors
+ for those clients. Copy AppKit's Apple internal logic for identifying
+ the special Mac Catalyst clients that are allowed to use the AppKit
+ types, and when such clients use WebKitLegacy, don't redeclare the
+ AppKit types.
+
+ * platform/ios/KeyEventCodesIOS.h:
+ * platform/ios/wak/WAKAppKitStubs.h:
+ * platform/ios/wak/WAKView.h:
+ * platform/ios/wak/WAKWindow.h:
+
+ Source/WebKitLegacy/ios:
+
+ WebKitLegacy can't always define NSView to WAKView in Mac Catalyst, but
+ views are always WAKView in Mac Catalyst. Switch on TARGET_OS_IPHONE to
+ declare WAKView explicitly.
+
+ * WebView/WebUIKitDelegate.h:
+
+ Source/WebKitLegacy/mac:
+
+ WebKitLegacy can't always define NSClipView/NSView/NSScrollView/
+ NSWindow/NSResponder to their WAK counterparts in Mac Catalyst, but
+ those types are always the WAK ones in Mac Catalyst. Switch on
+ TARGET_OS_IPHONE to declare the WAK types explicitly.
+
+ * Misc/WebDownload.h:
+ * Misc/WebNSViewExtras.h:
+ * Plugins/WebPluginDatabase.h:
+ * WebView/WebDocument.h:
+ * WebView/WebDocumentPrivate.h:
+ * WebView/WebFramePrivate.h:
+ * WebView/WebFrameView.h:
+ (WEBKIT_CLASS_DEPRECATED_MAC):
+ * WebView/WebFrameViewPrivate.h:
+ * WebView/WebHTMLRepresentation.h:
+ * WebView/WebHTMLRepresentationPrivate.h:
+ * WebView/WebHTMLView.h:
+ * WebView/WebHTMLViewPrivate.h:
+ * WebView/WebUIDelegate.h:
+ * WebView/WebUIDelegatePrivate.h:
+ * WebView/WebView.h:
+ (WEBKIT_CLASS_DEPRECATED_MAC):
+ * WebView/WebViewPrivate.h:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-28 Ian Anderson <[email protected]>
+
+ Some Apple internal clients fail to build due to redeclared AppKit types in WebKitLegacy
+ https://bugs.webkit.org/show_bug.cgi?id=238368
+
+ Reviewed by Jonathan Bedard.
+
+ Some Apple internal Mac Catalyst clients need to use both AppKit and
+ WebKitLegacy. WebKitLegacy's redeclaration of AppKit types causes errors
+ for those clients. Copy AppKit's Apple internal logic for identifying
+ the special Mac Catalyst clients that are allowed to use the AppKit
+ types, and when such clients use WebKitLegacy, don't redeclare the
+ AppKit types.
+
+ * platform/ios/KeyEventCodesIOS.h:
+ * platform/ios/wak/WAKAppKitStubs.h:
+ * platform/ios/wak/WAKView.h:
+ * platform/ios/wak/WAKWindow.h:
+
+2022-03-31 Russell Epstein <[email protected]>
+
Cherry-pick r291983. rdar://problem/90706660
Accessing WebGL content crashes in macOS Recovery OS, workaround 2
Modified: branches/safari-614.1.8-branch/Source/WebCore/platform/ios/KeyEventCodesIOS.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebCore/platform/ios/KeyEventCodesIOS.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebCore/platform/ios/KeyEventCodesIOS.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -27,6 +27,12 @@
#if TARGET_OS_IPHONE
+#import <WebCore/WAKAppKitStubs.h>
+
+#if WAK_APPKIT_API_AVAILABLE_MACCATALYST
+#import <AppKit/NSEvent.h>
+#else
+
// Unicodes we reserve for function keys on the keyboard,
// OpenStep reserves the range 0xF700-0xF8FF for this purpose.
// The availability of various keys will be system dependent.
@@ -105,7 +111,11 @@
NSHelpFunctionKey = 0xF746,
NSModeSwitchFunctionKey = 0xF747
};
+#endif // WAK_APPKIT_API_AVAILABLE_MACCATALYST
+#if WAK_APPKIT_API_AVAILABLE_MACCATALYST
+#import <AppKit/NSText.h>
+#else
enum {
NSParagraphSeparatorCharacter = 0x2029,
NSLineSeparatorCharacter = 0x2028,
@@ -118,5 +128,6 @@
NSBackTabCharacter = 0x0019,
NSDeleteCharacter = 0x007f
};
+#endif // WAK_APPKIT_API_AVAILABLE_MACCATALYST
#endif // TARGET_OS_IPHONE
Modified: branches/safari-614.1.8-branch/Source/WebCore/platform/ios/wak/WAKAppKitStubs.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebCore/platform/ios/wak/WAKAppKitStubs.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebCore/platform/ios/wak/WAKAppKitStubs.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -32,6 +32,29 @@
#import <CoreGraphics/CoreGraphics.h>
+// WebKitLegacy was built around AppKit, which isn't present on iOS,
+// so WebKitLegacy redeclares many AppKit types on iOS. This is a problem
+// for Mac Catalyst where AppKit is present and usable, because the
+// redeclared types now conflict with the original types. Normally the AppKit
+// types are marked unavailable, so WebKitLegacy still needs to redeclare
+// them to make them available. As long as Mac Catalyst clients stick to UIKit
+// and WebKitLegacy, and don't directly import AppKit, things are fine.
+// However, there are a few special Apple internal Mac Catalyst clients that
+// are able to use all of the normally unavailable AppKit types, and so
+// those clients need WebKitLegacy to use the AppKit types directly rather
+// than redeclare them. Duplicate the Apple internal APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
+// logic to identify when this is the case.
+#if TARGET_OS_MACCATALYST && ((defined(__UIKIT_BUILDING_UIKIT__) && __UIKIT_BUILDING_UIKIT__) || (defined(__SWIFTUI_BUILDING_SWIFTUI__) && __SWIFTUI_BUILDING_SWIFTUI__) || (defined(__UIKIT_AX_BUILDING_UIKIT_AX__) && __UIKIT_AX_BUILDING_UIKIT_AX__))
+#define WAK_APPKIT_API_AVAILABLE_MACCATALYST 1
+#else
+#define WAK_APPKIT_API_AVAILABLE_MACCATALYST 0
+#endif
+
+#if WAK_APPKIT_API_AVAILABLE_MACCATALYST
+#import <AppKit/NSClipView.h>
+#import <AppKit/NSScrollView.h>
+#import <AppKit/NSView.h>
+#else
#ifndef NSClipView
#define NSClipView WAKClipView
#endif
@@ -41,9 +64,15 @@
#ifndef NSScrollView
#define NSScrollView WAKScrollView
#endif
+#endif // WAK_APPKIT_API_AVAILABLE_MACCATALYST
+// There is no <WebKit/WebDynamicScrollBarsView.h> in Mac Catalyst.
#ifndef WebDynamicScrollBarsView
#define WebDynamicScrollBarsView WAKScrollView
#endif
+#if WAK_APPKIT_API_AVAILABLE_MACCATALYST
+#import <AppKit/NSResponder.h>
+#import <AppKit/NSWindow.h>
+#else
#ifndef NSWindow
#define NSWindow WAKWindow
#endif
@@ -50,6 +79,7 @@
#ifndef NSResponder
#define NSResponder WAKResponder
#endif
+#endif // WAK_APPKIT_API_AVAILABLE_MACCATALYST
// FIXME: <rdar://problem/6669434> Switch from using NSGeometry methods to CGGeometry methods
//
@@ -163,6 +193,9 @@
WKNSEventModifierFlagDeviceIndependentFlagsMask = 0xffff0000U
};
+#if WAK_APPKIT_API_AVAILABLE_MACCATALYST
+#import <AppKit/NSEvent.h>
+#else
#ifndef NSEventModifierFlagCapsLock
#define NSEventModifierFlagCapsLock WKNSEventModifierFlagCapsLock
#define NSEventModifierFlagShift WKNSEventModifierFlagShift
@@ -174,6 +207,7 @@
#define NSEventModifierFlagFunction WKNSEventModifierFlagFunction
#define NSEventModifierFlagDeviceIndependentFlagsMask WKNSEventModifierFlagDeviceIndependentFlagsMask
#endif
+#endif // WAK_APPKIT_API_AVAILABLE_MACCATALYST
typedef enum _WKWritingDirection {
WKWritingDirectionNatural = -1, /* Determines direction using the Unicode Bidi Algorithm rules P2 and P3 */
@@ -186,11 +220,15 @@
WKNSSelectionAffinityDownstream = 1
};
+#if WAK_APPKIT_API_AVAILABLE_MACCATALYST
+#import <AppKit/NSTextView.h>
+#else
#ifndef NSSelectionAffinityUpstream
#define NSSelectionAffinity WKNSSelectionAffinity
#define NSSelectionAffinityUpstream WKNSSelectionAffinityUpstream
#define NSSelectionAffinityDownstream WKNSSelectionAffinityDownstream
#endif
+#endif // WAK_APPKIT_API_AVAILABLE_MACCATALYST
typedef NS_ENUM(NSInteger, WKNSControlStateValue) {
WKNSControlStateValueMixed = -1,
@@ -198,6 +236,9 @@
WKNSControlStateValueOn = 1
};
+#if WAK_APPKIT_API_AVAILABLE_MACCATALYST
+#import <AppKit/NSCell.h>
+#else
#ifndef NSControlStateValueMixed
#define NSControlStateValue WKNSControlStateValue
#define NSControlStateValueMixed WKNSControlStateValueMixed
@@ -204,6 +245,7 @@
#define NSControlStateValueOff WKNSControlStateValueOff
#define NSControlStateValueOn WKNSControlStateValueOn
#endif
+#endif // WAK_APPKIT_API_AVAILABLE_MACCATALYST
typedef NS_ENUM(NSUInteger, WKNSCompositingOperation) {
WKNSCompositeClear = 0,
@@ -222,6 +264,9 @@
WKNSCompositePlusLighter = 13
};
+#if WAK_APPKIT_API_AVAILABLE_MACCATALYST
+#import <AppKit/NSGraphics.h>
+#else
#ifndef NSCompositeClear
#define NSCompositingOperation WKNSCompositingOperation
#define NSCompositeClear WKNSCompositeClear
@@ -239,6 +284,7 @@
#define NSCompositeHighlight WKNSCompositeHighlight
#define NSCompositePlusLighter WKNSCompositePlusLighter
#endif
+#endif // WAK_APPKIT_API_AVAILABLE_MACCATALYST
typedef NS_ENUM(NSUInteger, WKNSSelectionDirection) {
WKNSDirectSelection = 0,
@@ -246,6 +292,11 @@
WKNSSelectingPrevious
};
+#if WAK_APPKIT_API_AVAILABLE_MACCATALYST
+// Included earlier, but the following constants are
+// in NSWindow.h.
+// #import <AppKit/NSWindow.h>
+#else
#ifndef NSDirectSelection
#define NSSelectionDirection WKNSSelectionDirection
#define NSDirectSelection WKNSDirectSelection
@@ -252,6 +303,7 @@
#define NSSelectingNext WKNSSelectingNext
#define NSSelectingPrevious WKNSSelectingPrevious
#endif
+#endif // WAK_APPKIT_API_AVAILABLE_MACCATALYST
#endif // TARGET_OS_IPHONE
Modified: branches/safari-614.1.8-branch/Source/WebCore/platform/ios/wak/WAKView.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebCore/platform/ios/wak/WAKView.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebCore/platform/ios/wak/WAKView.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -37,6 +37,9 @@
extern NSString *WAKViewFrameSizeDidChangeNotification;
extern NSString *WAKViewDidScrollNotification;
+#if WAK_APPKIT_API_AVAILABLE_MACCATALYST
+#import <AppKit/NSView.h>
+#else
enum {
NSViewNotSizable = 0,
NSViewMinXMargin = 1,
@@ -46,6 +49,7 @@
NSViewHeightSizable = 16,
NSViewMaxYMargin = 32
};
+#endif
@class WAKWindow;
Modified: branches/safari-614.1.8-branch/Source/WebCore/platform/ios/wak/WAKWindow.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebCore/platform/ios/wak/WAKWindow.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebCore/platform/ios/wak/WAKWindow.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -114,7 +114,7 @@
- (BOOL)isVisible;
- (void)setVisible:(BOOL)visible;
- (NSSelectionDirection)keyViewSelectionDirection;
-- (BOOL)makeFirstResponder:(NSResponder *)responder;
+- (BOOL)makeFirstResponder:(WAKResponder *)responder;
- (WAKView *)_newFirstResponderAfterResigning NS_RETURNS_NOT_RETAINED;
- (void)setFrame:(NSRect)frameRect display:(BOOL)flag;
- (CGRect)frame;
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/ios/ChangeLog (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/ios/ChangeLog 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/ios/ChangeLog 2022-03-31 21:31:32 UTC (rev 292179)
@@ -1,3 +1,76 @@
+2022-03-31 Russell Epstein <[email protected]>
+
+ Cherry-pick r291978. rdar://problem/90497026
+
+ Some Apple internal clients fail to build due to redeclared AppKit types in WebKitLegacy
+ https://bugs.webkit.org/show_bug.cgi?id=238368
+
+ Patch by Ian Anderson <[email protected]> on 2022-03-28
+ Reviewed by Jonathan Bedard.
+
+ Source/WebCore:
+
+ Some Apple internal Mac Catalyst clients need to use both AppKit and
+ WebKitLegacy. WebKitLegacy's redeclaration of AppKit types causes errors
+ for those clients. Copy AppKit's Apple internal logic for identifying
+ the special Mac Catalyst clients that are allowed to use the AppKit
+ types, and when such clients use WebKitLegacy, don't redeclare the
+ AppKit types.
+
+ * platform/ios/KeyEventCodesIOS.h:
+ * platform/ios/wak/WAKAppKitStubs.h:
+ * platform/ios/wak/WAKView.h:
+ * platform/ios/wak/WAKWindow.h:
+
+ Source/WebKitLegacy/ios:
+
+ WebKitLegacy can't always define NSView to WAKView in Mac Catalyst, but
+ views are always WAKView in Mac Catalyst. Switch on TARGET_OS_IPHONE to
+ declare WAKView explicitly.
+
+ * WebView/WebUIKitDelegate.h:
+
+ Source/WebKitLegacy/mac:
+
+ WebKitLegacy can't always define NSClipView/NSView/NSScrollView/
+ NSWindow/NSResponder to their WAK counterparts in Mac Catalyst, but
+ those types are always the WAK ones in Mac Catalyst. Switch on
+ TARGET_OS_IPHONE to declare the WAK types explicitly.
+
+ * Misc/WebDownload.h:
+ * Misc/WebNSViewExtras.h:
+ * Plugins/WebPluginDatabase.h:
+ * WebView/WebDocument.h:
+ * WebView/WebDocumentPrivate.h:
+ * WebView/WebFramePrivate.h:
+ * WebView/WebFrameView.h:
+ (WEBKIT_CLASS_DEPRECATED_MAC):
+ * WebView/WebFrameViewPrivate.h:
+ * WebView/WebHTMLRepresentation.h:
+ * WebView/WebHTMLRepresentationPrivate.h:
+ * WebView/WebHTMLView.h:
+ * WebView/WebHTMLViewPrivate.h:
+ * WebView/WebUIDelegate.h:
+ * WebView/WebUIDelegatePrivate.h:
+ * WebView/WebView.h:
+ (WEBKIT_CLASS_DEPRECATED_MAC):
+ * WebView/WebViewPrivate.h:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-28 Ian Anderson <[email protected]>
+
+ Some Apple internal clients fail to build due to redeclared AppKit types in WebKitLegacy
+ https://bugs.webkit.org/show_bug.cgi?id=238368
+
+ Reviewed by Jonathan Bedard.
+
+ WebKitLegacy can't always define NSView to WAKView in Mac Catalyst, but
+ views are always WAKView in Mac Catalyst. Switch on TARGET_OS_IPHONE to
+ declare WAKView explicitly.
+
+ * WebView/WebUIKitDelegate.h:
+
2022-03-16 Youenn Fablet <[email protected]>
Make MIMETypeRegistry::mimeTypeForPath take a StringView
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/ios/WebView/WebUIKitDelegate.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/ios/WebView/WebUIKitDelegate.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/ios/WebView/WebUIKitDelegate.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -85,7 +85,11 @@
// BackForwardCache support
- (void)webViewDidRestoreFromPageCache:(WebView *)webView;
+#if TARGET_OS_IPHONE
+- (WAKView *)webView:(WebView *)webView plugInViewWithArguments:(NSDictionary *)arguments fromPlugInPackage:(WebPluginPackage *)package;
+#else
- (NSView *)webView:(WebView *)webView plugInViewWithArguments:(NSDictionary *)arguments fromPlugInPackage:(WebPluginPackage *)package;
+#endif
- (void)webView:(WebView *)webView willShowFullScreenForPlugInView:(id)plugInView;
- (void)webView:(WebView *)webView didHideFullScreenForPlugInView:(id)plugInView;
- (void)webView:(WebView *)aWebView didReceiveMessage:(NSDictionary *)aMessage;
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/ChangeLog (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/ChangeLog 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/ChangeLog 2022-03-31 21:31:32 UTC (rev 292179)
@@ -1,3 +1,94 @@
+2022-03-31 Russell Epstein <[email protected]>
+
+ Cherry-pick r291978. rdar://problem/90497026
+
+ Some Apple internal clients fail to build due to redeclared AppKit types in WebKitLegacy
+ https://bugs.webkit.org/show_bug.cgi?id=238368
+
+ Patch by Ian Anderson <[email protected]> on 2022-03-28
+ Reviewed by Jonathan Bedard.
+
+ Source/WebCore:
+
+ Some Apple internal Mac Catalyst clients need to use both AppKit and
+ WebKitLegacy. WebKitLegacy's redeclaration of AppKit types causes errors
+ for those clients. Copy AppKit's Apple internal logic for identifying
+ the special Mac Catalyst clients that are allowed to use the AppKit
+ types, and when such clients use WebKitLegacy, don't redeclare the
+ AppKit types.
+
+ * platform/ios/KeyEventCodesIOS.h:
+ * platform/ios/wak/WAKAppKitStubs.h:
+ * platform/ios/wak/WAKView.h:
+ * platform/ios/wak/WAKWindow.h:
+
+ Source/WebKitLegacy/ios:
+
+ WebKitLegacy can't always define NSView to WAKView in Mac Catalyst, but
+ views are always WAKView in Mac Catalyst. Switch on TARGET_OS_IPHONE to
+ declare WAKView explicitly.
+
+ * WebView/WebUIKitDelegate.h:
+
+ Source/WebKitLegacy/mac:
+
+ WebKitLegacy can't always define NSClipView/NSView/NSScrollView/
+ NSWindow/NSResponder to their WAK counterparts in Mac Catalyst, but
+ those types are always the WAK ones in Mac Catalyst. Switch on
+ TARGET_OS_IPHONE to declare the WAK types explicitly.
+
+ * Misc/WebDownload.h:
+ * Misc/WebNSViewExtras.h:
+ * Plugins/WebPluginDatabase.h:
+ * WebView/WebDocument.h:
+ * WebView/WebDocumentPrivate.h:
+ * WebView/WebFramePrivate.h:
+ * WebView/WebFrameView.h:
+ (WEBKIT_CLASS_DEPRECATED_MAC):
+ * WebView/WebFrameViewPrivate.h:
+ * WebView/WebHTMLRepresentation.h:
+ * WebView/WebHTMLRepresentationPrivate.h:
+ * WebView/WebHTMLView.h:
+ * WebView/WebHTMLViewPrivate.h:
+ * WebView/WebUIDelegate.h:
+ * WebView/WebUIDelegatePrivate.h:
+ * WebView/WebView.h:
+ (WEBKIT_CLASS_DEPRECATED_MAC):
+ * WebView/WebViewPrivate.h:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-28 Ian Anderson <[email protected]>
+
+ Some Apple internal clients fail to build due to redeclared AppKit types in WebKitLegacy
+ https://bugs.webkit.org/show_bug.cgi?id=238368
+
+ Reviewed by Jonathan Bedard.
+
+ WebKitLegacy can't always define NSClipView/NSView/NSScrollView/
+ NSWindow/NSResponder to their WAK counterparts in Mac Catalyst, but
+ those types are always the WAK ones in Mac Catalyst. Switch on
+ TARGET_OS_IPHONE to declare the WAK types explicitly.
+
+ * Misc/WebDownload.h:
+ * Misc/WebNSViewExtras.h:
+ * Plugins/WebPluginDatabase.h:
+ * WebView/WebDocument.h:
+ * WebView/WebDocumentPrivate.h:
+ * WebView/WebFramePrivate.h:
+ * WebView/WebFrameView.h:
+ (WEBKIT_CLASS_DEPRECATED_MAC):
+ * WebView/WebFrameViewPrivate.h:
+ * WebView/WebHTMLRepresentation.h:
+ * WebView/WebHTMLRepresentationPrivate.h:
+ * WebView/WebHTMLView.h:
+ * WebView/WebHTMLViewPrivate.h:
+ * WebView/WebUIDelegate.h:
+ * WebView/WebUIDelegatePrivate.h:
+ * WebView/WebView.h:
+ (WEBKIT_CLASS_DEPRECATED_MAC):
+ * WebView/WebViewPrivate.h:
+
2022-03-26 Yusuke Suzuki <[email protected]>
Use static_assert instead of COMPILE_ASSERT
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/Misc/WebDownload.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/Misc/WebDownload.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/Misc/WebDownload.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -44,7 +44,9 @@
#import <WebKitLegacy/WAKAppKitStubs.h>
#endif
+#if !TARGET_OS_IPHONE
@class NSWindow;
+#endif
@class WebDownloadInternal;
/*!
@@ -78,7 +80,11 @@
/*!
@method downloadWindowForAuthenticationSheet:
*/
+#if TARGET_OS_IPHONE
+- (WAKWindow *)downloadWindowForAuthenticationSheet:(WebDownload *)download;
+#else
- (NSWindow *)downloadWindowForAuthenticationSheet:(WebDownload *)download;
+#endif
@end
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/Misc/WebNSViewExtras.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/Misc/WebNSViewExtras.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/Misc/WebNSViewExtras.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -41,10 +41,18 @@
@class WebFrameView;
@class WebView;
+#if TARGET_OS_IPHONE
+@interface WAKView (WebExtras)
+#else
@interface NSView (WebExtras)
+#endif
// Returns the nearest enclosing view of the given class, or nil if none.
+#if TARGET_OS_IPHONE
+- (WAKView *)_web_superviewOfClass:(Class)viewClass;
+#else
- (NSView *)_web_superviewOfClass:(Class)viewClass;
+#endif
- (WebFrameView *)_web_parentWebFrameView;
#if !TARGET_OS_IPHONE
- (WebView *)_webView;
@@ -78,7 +86,7 @@
@class WebFrame;
@class WebView;
-@interface NSView (WebDocumentViewExtras)
+@interface WAKView (WebDocumentViewExtras)
- (WebFrame *)_frame;
- (WebView *)_webView;
@end
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -64,8 +64,13 @@
- (void)close;
+#if TARGET_OS_IPHONE
+- (void)addPluginInstanceView:(WAKView *)view;
+- (void)removePluginInstanceView:(WAKView *)view;
+#else
- (void)addPluginInstanceView:(NSView *)view;
- (void)removePluginInstanceView:(NSView *)view;
+#endif
- (void)removePluginInstanceViewsFor:(WebFrame *)webFrame;
- (void)destroyAllPluginInstanceViews;
@end
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebDocument.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebDocument.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebDocument.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -80,7 +80,11 @@
@param hostWindow The host window for the document view.
@abstract Called before the host window is set on the parent web view.
*/
+#if TARGET_OS_IPHONE
+- (void)viewWillMoveToHostWindow:(WAKWindow *)hostWindow;
+#else
- (void)viewWillMoveToHostWindow:(NSWindow *)hostWindow;
+#endif
/*!
@method viewDidMoveToHostWindow
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebDocumentPrivate.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebDocumentPrivate.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebDocumentPrivate.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -29,6 +29,9 @@
#import <WebKitLegacy/WebDocument.h>
#import <WebKitLegacy/WebFrame.h>
#import <WebKitLegacy/WebHTMLView.h>
+#if TARGET_OS_IPHONE
+#import <WebKitLegacy/WAKView.h>
+#endif
@class DOMDocument;
@class PDFDocument;
@@ -71,7 +74,11 @@
// View that draws the selection and can be made first responder. Often this is self but it could be
// a nested view, as for example in the case of WebPDFView.
+#if TARGET_OS_IPHONE
+- (WAKView *)selectionView;
+#else
- (NSView *)selectionView;
+#endif
@end
@protocol WebDocumentPDF <WebDocumentText>
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebFramePrivate.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebFramePrivate.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebFramePrivate.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -134,7 +134,11 @@
- (NSRect)caretRect;
- (NSRect)rectForScrollToVisible; // return caretRect if selection is caret, selectionRect otherwise
@property (nonatomic, readwrite) CGColorRef caretColor;
+#if TARGET_OS_IPHONE
+- (WAKView *)documentView;
+#else
- (NSView *)documentView;
+#endif
- (int)layoutCount;
- (BOOL)isTelephoneNumberParsingAllowed;
- (BOOL)isTelephoneNumberParsingEnabled;
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebFrameView.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebFrameView.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebFrameView.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -46,7 +46,11 @@
@class WebFrameView
*/
WEBKIT_CLASS_DEPRECATED_MAC(10_3, 10_14)
+#if TARGET_OS_IPHONE
+@interface WebFrameView : WAKView
+#else
@interface WebFrameView : NSView
+#endif
{
@package
WebFrameViewPrivate *_private;
@@ -63,7 +67,11 @@
@abstract The WebFrameView's document subview
@discussion The subview that renders the WebFrameView's contents
*/
+#if TARGET_OS_IPHONE
+@property (nonatomic, readonly, strong) WAKView<WebDocumentView> *documentView;
+#else
@property (nonatomic, readonly, strong) NSView<WebDocumentView> *documentView;
+#endif
/*!
@property allowsScrolling
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebFrameViewPrivate.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebFrameViewPrivate.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebFrameViewPrivate.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -27,6 +27,9 @@
*/
#import <WebKitLegacy/WebFrameView.h>
+#if TARGET_OS_IPHONE
+#import <WebKitLegacy/WAKAppKitStubs.h>
+#endif
@interface WebFrameView (WebPrivate)
@@ -68,7 +71,11 @@
@method _contentView
@result The content view (NSClipView) of the WebFrameView's scroll view.
*/
+#if TARGET_OS_IPHONE
+- (WAKClipView *)_contentView;
+#else
- (NSClipView *)_contentView;
+#endif
/*!
@method _customScrollViewClass
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -31,7 +31,9 @@
#import <WebKitLegacy/WebDocumentPrivate.h>
@class WebHTMLRepresentationPrivate;
+#if !TARGET_OS_IPHONE
@class NSView;
+#endif
@class DOMNode;
@class DOMElement;
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentationPrivate.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentationPrivate.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentationPrivate.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -27,10 +27,17 @@
*/
#import <WebKitLegacy/WebHTMLRepresentation.h>
+#if TARGET_OS_IPHONE
+#import <WebKitLegacy/WAKView.h>
+#endif
@protocol WebPluginManualLoader;
@interface WebHTMLRepresentation (WebPrivate)
+#if TARGET_OS_IPHONE
+- (void)_redirectDataToManualLoader:(id<WebPluginManualLoader>)manualLoader forPluginView:(WAKView *)pluginView;
+#else
- (void)_redirectDataToManualLoader:(id<WebPluginManualLoader>)manualLoader forPluginView:(NSView *)pluginView;
+#endif
- (void)printDOMTree;
@end
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebHTMLView.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebHTMLView.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebHTMLView.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -45,7 +45,7 @@
#if !TARGET_OS_IPHONE
@interface WebHTMLView : NSControl <WebDocumentView, WebDocumentSearching>
#else
-@interface WebHTMLView : NSView <WebDocumentView, WebDocumentSearching>
+@interface WebHTMLView : WAKView <WebDocumentView, WebDocumentSearching>
#endif
{
@private
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebHTMLViewPrivate.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebHTMLViewPrivate.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebHTMLViewPrivate.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -27,6 +27,9 @@
*/
#import <WebKitLegacy/WebHTMLView.h>
+#if TARGET_OS_IPHONE
+#import <WebKitLegacy/WAKView.h>
+#endif
@class DOMDocumentFragment;
@class DOMNode;
@@ -108,7 +111,11 @@
#endif
- (BOOL)_isUsingAcceleratedCompositing;
+#if TARGET_OS_IPHONE
+- (WAKView *)_compositingLayersHostingView;
+#else
- (NSView *)_compositingLayersHostingView;
+#endif
#if !TARGET_OS_IPHONE
// SPI for printing (should be converted to API someday). When the WebHTMLView isn't being printed
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebUIDelegate.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebUIDelegate.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebUIDelegate.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -247,7 +247,11 @@
on the real NSWindow would. It's OK to return either nil or the
real first responder if some control not in the window has focus.
*/
+#if TARGET_OS_IPHONE
+- (WAKResponder *)webViewFirstResponder:(WebView *)sender;
+#else
- (NSResponder *)webViewFirstResponder:(WebView *)sender;
+#endif
/*!
@method webView:makeFirstResponder:
@@ -260,7 +264,11 @@
hierarchy, it may be desirable to save the first responder
elsewhere, or possibly ignore this call.
*/
+#if TARGET_OS_IPHONE
+- (void)webView:(WebView *)sender makeFirstResponder:(WAKResponder *)responder;
+#else
- (void)webView:(WebView *)sender makeFirstResponder:(NSResponder *)responder;
+#endif
/*!
@method webView:setStatusText:
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -28,6 +28,9 @@
#import <WebKitLegacy/WebAllowDenyPolicyListener.h>
#import <WebKitLegacy/WebUIDelegate.h>
+#if TARGET_OS_IPHONE
+#import <WebKitLegacy/WAKView.h>
+#endif
#if !defined(ENABLE_DASHBOARD_SUPPORT)
#if !TARGET_OS_IPHONE
@@ -204,7 +207,11 @@
*/
- (void)webView:(WebView *)webView addMessageToConsole:(NSDictionary *)message withSource:(NSString *)source;
+#if TARGET_OS_IPHONE
+- (WAKView *)webView:(WebView *)webView plugInViewWithArguments:(NSDictionary *)arguments;
+#else
- (NSView *)webView:(WebView *)webView plugInViewWithArguments:(NSDictionary *)arguments;
+#endif
#if ENABLE_DASHBOARD_SUPPORT
// FIXME: Remove this method once it is verified no one is dependent on it.
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebView.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebView.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebView.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -126,7 +126,11 @@
content should be handled, based on the resource's URL and MIME type.
*/
WEBKIT_CLASS_DEPRECATED_MAC(10_3, 10_14, "No longer supported; please adopt WKWebView.")
+#if TARGET_OS_IPHONE
+@interface WebView : WAKView
+#else
@interface WebView : NSView
+#endif
{
@private
WebViewPrivate *_private;
@@ -407,7 +411,11 @@
properly. Set a host window so these parts continue to function even when the web view is
not in an actual window.
*/
+#if TARGET_OS_IPHONE
+@property (nonatomic, strong) WAKWindow *hostWindow;
+#else
@property (nonatomic, strong) NSWindow *hostWindow;
+#endif
/*!
@method searchFor:direction:caseSensitive:
Modified: branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h (292178 => 292179)
--- branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h 2022-03-31 21:27:37 UTC (rev 292178)
+++ branches/safari-614.1.8-branch/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h 2022-03-31 21:31:32 UTC (rev 292179)
@@ -32,6 +32,7 @@
#if TARGET_OS_IPHONE
#import <CoreGraphics/CGColor.h>
+#import <WebKitLegacy/WAKView.h>
#endif
#if !defined(ENABLE_DASHBOARD_SUPPORT)
@@ -683,7 +684,11 @@
If layer is NULL, removes any existing layer. Returns YES if the set or
remove was successful.
*/
+#if TARGET_OS_IPHONE
+- (BOOL)_setMediaLayer:(CALayer*)layer forPluginView:(WAKView*)pluginView;
+#else
- (BOOL)_setMediaLayer:(CALayer*)layer forPluginView:(NSView*)pluginView;
+#endif
/*!
@method _wantsTelephoneNumberParsing
@@ -895,7 +900,11 @@
- (void)_setFontFallbackPrefersPictographs:(BOOL)flag;
+#if TARGET_OS_IPHONE
+- (void)showCandidates:(NSArray *)candidates forString:(NSString *)string inRect:(NSRect)rectOfTypedString forSelectedRange:(NSRange)range view:(WAKView *)view completionHandler:(void (^)(NSTextCheckingResult *acceptedCandidate))completionBlock;
+#else
- (void)showCandidates:(NSArray *)candidates forString:(NSString *)string inRect:(NSRect)rectOfTypedString forSelectedRange:(NSRange)range view:(NSView *)view completionHandler:(void (^)(NSTextCheckingResult *acceptedCandidate))completionBlock;
+#endif
- (void)forceRequestCandidatesForTesting;
- (BOOL)shouldRequestCandidates;