Title: [291978] trunk/Source
Revision
291978
Author
[email protected]
Date
2022-03-28 10:58:11 -0700 (Mon, 28 Mar 2022)

Log Message

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:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (291977 => 291978)


--- trunk/Source/WebCore/ChangeLog	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebCore/ChangeLog	2022-03-28 17:58:11 UTC (rev 291978)
@@ -1,3 +1,22 @@
+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-28  Chris Dumez  <[email protected]>
 
         Use StringView for Yarr / RegularExpression parsing

Modified: trunk/Source/WebCore/platform/ios/KeyEventCodesIOS.h (291977 => 291978)


--- trunk/Source/WebCore/platform/ios/KeyEventCodesIOS.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebCore/platform/ios/KeyEventCodesIOS.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebCore/platform/ios/wak/WAKAppKitStubs.h (291977 => 291978)


--- trunk/Source/WebCore/platform/ios/wak/WAKAppKitStubs.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebCore/platform/ios/wak/WAKAppKitStubs.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebCore/platform/ios/wak/WAKView.h (291977 => 291978)


--- trunk/Source/WebCore/platform/ios/wak/WAKView.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebCore/platform/ios/wak/WAKView.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebCore/platform/ios/wak/WAKWindow.h (291977 => 291978)


--- trunk/Source/WebCore/platform/ios/wak/WAKWindow.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebCore/platform/ios/wak/WAKWindow.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/ios/ChangeLog (291977 => 291978)


--- trunk/Source/WebKitLegacy/ios/ChangeLog	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/ios/ChangeLog	2022-03-28 17:58:11 UTC (rev 291978)
@@ -1,3 +1,16 @@
+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: trunk/Source/WebKitLegacy/ios/WebView/WebUIKitDelegate.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/ios/WebView/WebUIKitDelegate.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/ios/WebView/WebUIKitDelegate.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/ChangeLog (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2022-03-28 17:58:11 UTC (rev 291978)
@@ -1,3 +1,34 @@
+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: trunk/Source/WebKitLegacy/mac/Misc/WebDownload.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/Misc/WebDownload.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebDownload.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/Misc/WebNSViewExtras.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/Misc/WebNSViewExtras.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebNSViewExtras.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/WebView/WebDocument.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/WebView/WebDocument.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebDocument.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/WebView/WebDocumentPrivate.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/WebView/WebDocumentPrivate.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebDocumentPrivate.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/WebView/WebFramePrivate.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/WebView/WebFramePrivate.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebFramePrivate.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/WebView/WebFrameView.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/WebView/WebFrameView.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebFrameView.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/WebView/WebFrameViewPrivate.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/WebView/WebFrameViewPrivate.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebFrameViewPrivate.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -31,7 +31,9 @@
 #import <WebKitLegacy/WebDocumentPrivate.h>
 
 @class WebHTMLRepresentationPrivate;
+#if !TARGET_OS_IPHONE
 @class NSView;
+#endif
 
 @class DOMNode;
 @class DOMElement;

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentationPrivate.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentationPrivate.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentationPrivate.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLViewPrivate.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLViewPrivate.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLViewPrivate.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/WebView/WebUIDelegate.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/WebView/WebUIDelegate.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebUIDelegate.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/WebView/WebView.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/WebView/WebView.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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: trunk/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h (291977 => 291978)


--- trunk/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h	2022-03-28 17:42:34 UTC (rev 291977)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h	2022-03-28 17:58:11 UTC (rev 291978)
@@ -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;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to