Skip to content

Commit 7d3699b

Browse files
Fix build after adding files to UIProcess/API/Cocoa
https://bugs.webkit.org/show_bug.cgi?id=218664 There is some code that assumes that unified sources always combine sources into the same translation units. inspectorWebView is used from _WKInspectorTesting.mm, but only defined in _WKInspector.mm so it should be added to a header. _WKUserContentWorld also doesn't include WKObject.h or RetainPtr.h but uses both. * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector inspectorWebView]): Deleted. * UIProcess/API/Cocoa/_WKInspectorPrivateForTesting.h: * UIProcess/API/Cocoa/_WKInspectorTesting.mm: (-[_WKInspector inspectorWebView]): * UIProcess/API/Cocoa/_WKUserContentWorldInternal.h: Canonical link: https://commits.webkit.org/231324@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 83d05ee commit 7d3699b

5 files changed

Lines changed: 29 additions & 8 deletions

File tree

Source/WebKit/ChangeLog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2020-11-06 Alex Christensen <achristensen@webkit.org>
2+
3+
Fix build after adding files to UIProcess/API/Cocoa
4+
https://bugs.webkit.org/show_bug.cgi?id=218664
5+
6+
There is some code that assumes that unified sources always combine sources into the same translation units.
7+
inspectorWebView is used from _WKInspectorTesting.mm, but only defined in _WKInspector.mm so it should be added to a header.
8+
_WKUserContentWorld also doesn't include WKObject.h or RetainPtr.h but uses both.
9+
10+
* UIProcess/API/Cocoa/_WKInspector.mm:
11+
(-[_WKInspector inspectorWebView]): Deleted.
12+
* UIProcess/API/Cocoa/_WKInspectorPrivateForTesting.h:
13+
* UIProcess/API/Cocoa/_WKInspectorTesting.mm:
14+
(-[_WKInspector inspectorWebView]):
15+
* UIProcess/API/Cocoa/_WKUserContentWorldInternal.h:
16+
117
2020-11-06 Wenson Hsieh <wenson_hsieh@apple.com>
218

319
Encoding PutImageData should not serialize separate IPC attachments for the image data

Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#import "WebPageProxy.h"
3232
#import "WebProcessProxy.h"
3333
#import "_WKFrameHandleInternal.h"
34+
#import "_WKInspectorPrivateForTesting.h"
3435
#import <WebCore/FrameIdentifier.h>
3536
#import <wtf/HashMap.h>
3637
#import <wtf/HashSet.h>
@@ -62,13 +63,6 @@ - (WKWebView *)webView
6263
return nil;
6364
}
6465

65-
- (WKWebView *)inspectorWebView
66-
{
67-
if (auto* page = _inspector->inspectorPage())
68-
return fromWebPageProxy(*page);
69-
return nil;
70-
}
71-
7266
- (BOOL)isConnected
7367
{
7468
return _inspector->isConnected();

Source/WebKit/UIProcess/API/Cocoa/_WKInspectorPrivateForTesting.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@
2727

2828
@interface _WKInspector (WKTesting)
2929
- (void)_openURLExternallyForTesting:(NSURL *)url useFrontendAPI:(BOOL)useFrontendAPI;
30+
- (WKWebView *)inspectorWebView;
3031
@end

Source/WebKit/UIProcess/API/Cocoa/_WKInspectorTesting.mm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#import "config.h"
2727

28-
#import "WKWebView.h"
28+
#import "WKWebViewInternal.h"
2929
#import "_WKInspectorInternal.h"
3030
#import "_WKInspectorPrivateForTesting.h"
3131

@@ -39,6 +39,13 @@
3939

4040
@implementation _WKInspector (WKTesting)
4141

42+
- (WKWebView *)inspectorWebView
43+
{
44+
if (auto* page = _inspector->inspectorPage())
45+
return fromWebPageProxy(*page);
46+
return nil;
47+
}
48+
4249
- (void)_openURLExternallyForTesting:(NSURL *)url useFrontendAPI:(BOOL)useFrontendAPI
4350
{
4451
if (useFrontendAPI)

Source/WebKit/UIProcess/API/Cocoa/_WKUserContentWorldInternal.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323
* THE POSSIBILITY OF SUCH DAMAGE.
2424
*/
2525

26+
#import "WKObject.h"
2627
#import "_WKUserContentWorld.h"
2728

29+
#import <wtf/RetainPtr.h>
30+
2831
@class WKContentWorld;
2932

3033
@interface _WKUserContentWorld () <WKObject> {

0 commit comments

Comments
 (0)