Skip to content
Permalink
Browse files
Add a module map file for PrivateFrameworks/WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=230735

Patch by Ian Anderson <iana@apple.com> on 2021-10-22
Reviewed by David Kilzer.

Source/WebCore:

Change a few quoted includes to framework style angle includes to
support modularization.
Make sure to define the TARGET_ macros before using them.

* platform/ios/WebItemProviderPasteboard.h:
* platform/ios/wak/WAKAppKitStubs.h:
* platform/ios/wak/WAKResponder.h:
* platform/ios/wak/WAKView.h:
* platform/ios/wak/WAKWindow.h:
* platform/ios/wak/WKContentObservation.h:
* platform/ios/wak/WebCoreThreadMessage.h:

Source/WebKitLegacy:

Add module map files for WebKitLegacy. The public module is empty
because there are no public headers. The private module map sets
PrivateHeaders as the umbrella directory because there isn't an umbrella
header already. Then it makes an explicit submodule for each header so
as to mimic the non-modular environment.

* Modules/WebKitLegacy.modulemap: Added.
* Modules/WebKitLegacy.private.modulemap: Added.
* WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/ios:

WebGeolocationCoreLocationProvider.h is an Objective-C++ header, but the
WebKitLegacy module should be usable by plain Objective-C clients. Add
C++ guards so that it can be included in the module.
Add a missing include to WebFixedPositionContent.h.

* Misc/WebGeolocationCoreLocationProvider.h:
* WebCoreSupport/WebFixedPositionContent.h:

Source/WebKitLegacy/mac:

Define modules for the Cocoa Touch environment. macOS can't define
modules in WebKitLegacy because it's a nested framework on that
platform.
Enable the modules verifier tool for Apple Internal (it's not supported
in the public Xcode).
Add the Apple Internal guards for NSURLDownload from WebDownload.h to
NSURLDownloadSPI.h so it can be included in the module.
WebCreateFragmentInternal.h is an Objective-C++ header, but the
WebKitLegacy module should be usable by plain Objective-C clients. Add
C++ guards so that it can be included in the module.
Switch a few quoted includes to framework style angle includes, which
are required for modules.
Add some missing includes.

* Configurations/WebKitLegacy.xcconfig:
* DOM/DOMEventListener.h:
* DOM/DOMEventTarget.h:
* DOM/DOMNodeFilter.h:
* DOM/DOMXPathNSResolver.h:
* DOM/WebDOMOperationsPrivate.h:
* History/WebHistoryItemPrivate.h:
* Misc/NSURLDownloadSPI.h:
* Misc/WebCache.h:
* Misc/WebDownload.h:
* Misc/WebKitErrorsPrivate.h:
* Misc/WebLocalizableStrings.h:
* Misc/WebUserContentURLPattern.h:
* Plugins/Hosted/WebKitPluginHostTypes.h:
* Plugins/WebPlugin.h:
* Plugins/WebPluginContainer.h:
* Storage/WebDatabaseManagerPrivate.h:
* Storage/WebDatabaseQuotaManager.h:
* Storage/WebStorageManagerPrivate.h:
* WebCoreSupport/WebCreateFragmentInternal.h:
* WebCoreSupport/WebSecurityOriginPrivate.h:
* WebView/WebDeviceOrientation.h:
* WebView/WebDeviceOrientationProvider.h:
* WebView/WebDeviceOrientationProviderMock.h:
* WebView/WebEditingDelegatePrivate.h:
* WebView/WebFormDelegatePrivate.h:
* WebView/WebGeolocationPosition.h:
* WebView/WebResourceLoadDelegatePrivate.h:

Canonical link: https://commits.webkit.org/243428@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
ian-twilightcoder authored and webkit-commit-queue committed Oct 22, 2021
1 parent fd727ad commit ab28f16aceaac28d264893d7149545f11ec8676b
Show file tree
Hide file tree
Showing 44 changed files with 216 additions and 29 deletions.
@@ -1,3 +1,22 @@
2021-10-22 Ian Anderson <iana@apple.com>

Add a module map file for PrivateFrameworks/WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=230735

Reviewed by David Kilzer.

Change a few quoted includes to framework style angle includes to
support modularization.
Make sure to define the TARGET_ macros before using them.

* platform/ios/WebItemProviderPasteboard.h:
* platform/ios/wak/WAKAppKitStubs.h:
* platform/ios/wak/WAKResponder.h:
* platform/ios/wak/WAKView.h:
* platform/ios/wak/WAKWindow.h:
* platform/ios/wak/WKContentObservation.h:
* platform/ios/wak/WebCoreThreadMessage.h:

2021-10-22 Alicia Boya García <aboya@igalia.com>

[MSE][GStreamer] Honor MP4 edit lists, bis
@@ -23,14 +23,14 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <CoreGraphics/CoreGraphics.h>

#if TARGET_OS_IPHONE
#import <WebCore/AbstractPasteboard.h>
#endif

#if TARGET_OS_IOS

struct CGSize;

typedef NS_ENUM(NSInteger, WebPreferredPresentationStyle) {
WebPreferredPresentationStyleUnspecified,
WebPreferredPresentationStyleInline,
@@ -26,10 +26,11 @@
#ifndef WAKAppKitStubs_h
#define WAKAppKitStubs_h

#import <Foundation/Foundation.h>

#if TARGET_OS_IPHONE

#import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h>

#ifndef NSClipView
#define NSClipView WAKClipView
@@ -26,10 +26,11 @@
#ifndef WAKResponder_h
#define WAKResponder_h

#import <Foundation/Foundation.h>

#if TARGET_OS_IPHONE

#import "WKTypes.h"
#import <Foundation/Foundation.h>
#import <WebCore/WKTypes.h>

@class WebEvent;

@@ -26,12 +26,13 @@
#ifndef WAKView_h
#define WAKView_h

#import <Foundation/Foundation.h>

#if TARGET_OS_IPHONE

#import "WAKAppKitStubs.h"
#import "WAKResponder.h"
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <WebCore/WAKAppKitStubs.h>
#import <WebCore/WAKResponder.h>

extern NSString *WAKViewFrameSizeDidChangeNotification;
extern NSString *WAKViewDidScrollNotification;
@@ -25,13 +25,14 @@

#pragma once

#import <Foundation/Foundation.h>

#if TARGET_OS_IPHONE

#import "WAKAppKitStubs.h"
#import "WAKView.h"
#import "WKContentObservation.h"
#import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h>
#import <WebCore/WAKAppKitStubs.h>
#import <WebCore/WAKView.h>
#import <WebCore/WKContentObservation.h>

@class CALayer;
@class WebEvent;
@@ -26,6 +26,8 @@
#ifndef WKContentObservation_h
#define WKContentObservation_h

#include <TargetConditionals.h>

#if TARGET_OS_IPHONE

#ifdef __cplusplus
@@ -31,7 +31,7 @@
#import <Foundation/Foundation.h>

#ifdef __OBJC__
#import "WebCoreThread.h"
#import <WebCore/WebCoreThread.h>
#endif // __OBJC__

#if defined(__cplusplus)
@@ -1,3 +1,20 @@
2021-10-22 Ian Anderson <iana@apple.com>

Add a module map file for PrivateFrameworks/WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=230735

Reviewed by David Kilzer.

Add module map files for WebKitLegacy. The public module is empty
because there are no public headers. The private module map sets
PrivateHeaders as the umbrella directory because there isn't an umbrella
header already. Then it makes an explicit submodule for each header so
as to mimic the non-modular environment.

* Modules/WebKitLegacy.modulemap: Added.
* Modules/WebKitLegacy.private.modulemap: Added.
* WebKitLegacy.xcodeproj/project.pbxproj:

2021-10-14 Chris Dumez <cdumez@apple.com>

Unreviewed, fix up previous commit.
@@ -0,0 +1 @@

@@ -0,0 +1,5 @@
framework module WebKitLegacy [system] {
umbrella "PrivateHeaders"

explicit module * { export * }
}
@@ -1036,6 +1036,8 @@
848DFF860365FE6A00CA2ACA /* WebPluginViewFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginViewFactory.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
84AE905F062DE6A80075BBF9 /* WebDOMOperationsPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDOMOperationsPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
84CA5F7E042685E800CA2ACA /* WebKitErrorsPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKitErrorsPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
84E2901126FC3D99005139F2 /* WebKitLegacy.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = WebKitLegacy.modulemap; sourceTree = "<group>"; };
84E2901226FC3DA4005139F2 /* WebKitLegacy.private.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = WebKitLegacy.private.modulemap; sourceTree = "<group>"; };
930D02BB06275F640076701E /* WebViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebViewInternal.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
930D02BD06275F710076701E /* WebFrameInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFrameInternal.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
93154EF103A41270008635CE /* WebPanelAuthenticationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPanelAuthenticationHandler.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
@@ -1644,6 +1646,7 @@
1C68F63F095B5F9C00C2984E /* WebInspector */,
089C1665FE841158C02AAC07 /* Resources */,
7C02320E251B8E3A00BA7BB6 /* Scripts */,
534F75362578AAE8005BE7D8 /* Modules */,
0867D69AFE84028FC02AAC07 /* Frameworks and Libraries */,
034768DFFF38A50411DB9C8B /* Products */,
1C904FCE0BA9DCF20081E9D0 /* Configurations */,
@@ -1920,6 +1923,15 @@
name = PDF;
sourceTree = "<group>";
};
534F75362578AAE8005BE7D8 /* Modules */ = {
isa = PBXGroup;
children = (
84E2901126FC3D99005139F2 /* WebKitLegacy.modulemap */,
84E2901226FC3DA4005139F2 /* WebKitLegacy.private.modulemap */,
);
path = Modules;
sourceTree = "<group>";
};
6508A4A7099B375F00BCBF45 /* Default Delegates */ = {
isa = PBXGroup;
children = (
@@ -1,3 +1,18 @@
2021-10-22 Ian Anderson <iana@apple.com>

Add a module map file for PrivateFrameworks/WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=230735

Reviewed by David Kilzer.

WebGeolocationCoreLocationProvider.h is an Objective-C++ header, but the
WebKitLegacy module should be usable by plain Objective-C clients. Add
C++ guards so that it can be included in the module.
Add a missing include to WebFixedPositionContent.h.

* Misc/WebGeolocationCoreLocationProvider.h:
* WebCoreSupport/WebFixedPositionContent.h:

2021-10-20 David Kilzer <ddkilzer@apple.com>

WebPDFViewPlaceholder should use a weak delegate
@@ -23,10 +23,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <Foundation/NSObject.h>
#if defined(__cplusplus)

@class CLLocationManager;
@class NSString;
#import <Foundation/Foundation.h>

namespace WebCore {
class GeolocationPositionData;
@@ -59,3 +58,5 @@ class GeolocationPositionData;

- (void)setEnableHighAccuracy:(BOOL)flag;
@end

#endif
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h>

@class CALayer;
@@ -1,3 +1,53 @@
2021-10-22 Ian Anderson <iana@apple.com>

Add a module map file for PrivateFrameworks/WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=230735

Reviewed by David Kilzer.

Define modules for the Cocoa Touch environment. macOS can't define
modules in WebKitLegacy because it's a nested framework on that
platform.
Enable the modules verifier tool for Apple Internal (it's not supported
in the public Xcode).
Add the Apple Internal guards for NSURLDownload from WebDownload.h to
NSURLDownloadSPI.h so it can be included in the module.
WebCreateFragmentInternal.h is an Objective-C++ header, but the
WebKitLegacy module should be usable by plain Objective-C clients. Add
C++ guards so that it can be included in the module.
Switch a few quoted includes to framework style angle includes, which
are required for modules.
Add some missing includes.

* Configurations/WebKitLegacy.xcconfig:
* DOM/DOMEventListener.h:
* DOM/DOMEventTarget.h:
* DOM/DOMNodeFilter.h:
* DOM/DOMXPathNSResolver.h:
* DOM/WebDOMOperationsPrivate.h:
* History/WebHistoryItemPrivate.h:
* Misc/NSURLDownloadSPI.h:
* Misc/WebCache.h:
* Misc/WebDownload.h:
* Misc/WebKitErrorsPrivate.h:
* Misc/WebLocalizableStrings.h:
* Misc/WebUserContentURLPattern.h:
* Plugins/Hosted/WebKitPluginHostTypes.h:
* Plugins/WebPlugin.h:
* Plugins/WebPluginContainer.h:
* Storage/WebDatabaseManagerPrivate.h:
* Storage/WebDatabaseQuotaManager.h:
* Storage/WebStorageManagerPrivate.h:
* WebCoreSupport/WebCreateFragmentInternal.h:
* WebCoreSupport/WebSecurityOriginPrivate.h:
* WebView/WebDeviceOrientation.h:
* WebView/WebDeviceOrientationProvider.h:
* WebView/WebDeviceOrientationProviderMock.h:
* WebView/WebEditingDelegatePrivate.h:
* WebView/WebFormDelegatePrivate.h:
* WebView/WebGeolocationPosition.h:
* WebView/WebResourceLoadDelegatePrivate.h:

2021-10-19 Darin Adler <darin@apple.com>

[Cocoa] Merge and simplify the nsColor family of functions
@@ -156,3 +156,15 @@ SUPPORTS_TEXT_BASED_API[sdk=appletv*] = NO;
SUPPORTS_TEXT_BASED_API[sdk=watch*] = NO;
OTHER_TAPI_FLAGS[sdk=iphone*] = -x objective-c++ -std=gnu++1z -fno-rtti $(WK_CFLAGS_BUILD_FOR_TESTING_$(WK_BUILD_FOR_TESTING)) -DRELEASE_WITHOUT_OPTIMIZATIONS -exclude-private-header $(BUILT_PRODUCTS_DIR)/$(PRIVATE_HEADERS_FOLDER_PATH)/NSURLDownloadSPI.h -extra-private-header $(SOURCE_ROOT)/mac/TestingFunctions.h;
TAPI_VERIFY_MODE[sdk=iphone*] = Pedantic;

DEFINES_MODULE = $(DEFINES_MODULE_COCOA_TOUCH_$(WK_IS_COCOA_TOUCH));
DEFINES_MODULE_COCOA_TOUCH_YES = YES;

CLANG_MODULES_ENABLE_VERIFIER_TOOL = $(CLANG_MODULES_ENABLE_VERIFIER_TOOL_COCOA_TOUCH_$(WK_IS_COCOA_TOUCH)_$(USE_INTERNAL_SDK));
CLANG_MODULES_ENABLE_VERIFIER_TOOL_COCOA_TOUCH_YES_YES = YES;

MODULEMAP_FILE = $(MODULEMAP_FILE_COCOA_TOUCH_$(WK_IS_COCOA_TOUCH));
MODULEMAP_FILE_COCOA_TOUCH_YES = $(SRCROOT)/Modules/WebKitLegacy.modulemap;

MODULEMAP_PRIVATE_FILE = $(MODULEMAP_PRIVATE_FILE_COCOA_TOUCH_$(WK_IS_COCOA_TOUCH));
MODULEMAP_PRIVATE_FILE_COCOA_TOUCH_YES = $(SRCROOT)/Modules/WebKitLegacy.private.modulemap;
@@ -24,6 +24,7 @@
*/

#import <WebKitLegacy/WebKitAvailability.h>
#import <objc/NSObject.h>

@class DOMEvent;

@@ -23,6 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <Foundation/Foundation.h>
#import <WebKitLegacy/WebKitAvailability.h>

@class DOMEvent;
@@ -24,6 +24,7 @@
*/

#import <WebKitLegacy/WebKitAvailability.h>
#import <objc/NSObject.h>

@class DOMNode;

@@ -24,6 +24,7 @@
*/

#import <WebKitLegacy/WebKitAvailability.h>
#import <objc/NSObject.h>

@class NSString;

@@ -26,6 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <Foundation/Foundation.h>
#import <WebKitLegacy/WebDOMOperations.h>
#import <JavaScriptCore/JSBase.h>

@@ -26,6 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <CoreGraphics/CoreGraphics.h>
#import <WebKitLegacy/WebHistoryItem.h>

#if TARGET_OS_IPHONE
@@ -23,7 +23,18 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <Foundation/Foundation.h>
#import <WebKitLegacy/WebKitAvailability.h>

#if defined(TARGET_OS_MACCATALYST) && TARGET_OS_MACCATALYST
#import <CFNetwork/CFNSURLConnection.h>
#elif !TARGET_OS_IPHONE || (defined(USE_APPLE_INTERNAL_SDK) && USE_APPLE_INTERNAL_SDK)
#import <Foundation/NSURLDownload.h>
#else

@interface NSURLDownload : NSObject
@end

@protocol NSURLDownloadDelegate;

#endif
@@ -23,6 +23,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h>

#if TARGET_OS_IPHONE
@class WebFrame;
#endif
@@ -26,15 +26,15 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <Foundation/Foundation.h>
#import <WebKitLegacy/WebKitAvailability.h>

#ifndef WebDownload_h
#define WebDownload_h

#if (defined TARGET_OS_MACCATALYST && TARGET_OS_MACCATALYST)
#import <Foundation/Foundation.h>
#import <WebKitLegacy/WebKitAvailability.h>

#if defined(TARGET_OS_MACCATALYST) && TARGET_OS_MACCATALYST
#import <CFNetwork/CFNSURLConnection.h>
#elif !TARGET_OS_IPHONE || (defined USE_APPLE_INTERNAL_SDK && USE_APPLE_INTERNAL_SDK)
#elif !TARGET_OS_IPHONE || (defined(USE_APPLE_INTERNAL_SDK) && USE_APPLE_INTERNAL_SDK)
#import <Foundation/NSURLDownload.h>
#else
#import <WebKitLegacy/NSURLDownloadSPI.h>

0 comments on commit ab28f16

Please sign in to comment.