Changeset 240685 in webkit
- Timestamp:
- Jan 29, 2019, 2:40:44 PM (8 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 9 edited
- 2 moved
-
ChangeLog (modified) (1 diff)
-
PlatformMac.cmake (modified) (1 diff)
-
Shared/API/Cocoa/_WKNSWindowExtras.mm (modified) (2 diffs)
-
SourcesCocoa.txt (modified) (2 diffs)
-
UIProcess/API/Cocoa/_WKInspectorWindow.h (moved) (moved from trunk/Source/WebKit/UIProcess/mac/WKInspectorWindow.h ) (1 diff)
-
UIProcess/API/Cocoa/_WKInspectorWindow.mm (moved) (moved from trunk/Source/WebKit/UIProcess/mac/WKInspectorWindow.mm ) (1 diff)
-
UIProcess/WebInspectorProxy.h (modified) (1 diff)
-
UIProcess/mac/RemoteWebInspectorProxyMac.mm (modified) (1 diff)
-
UIProcess/mac/WebInspectorProxyMac.mm (modified) (4 diffs)
-
UnifiedSources-input.xcfilelist (modified) (2 diffs)
-
WebKit.xcodeproj/project.pbxproj (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r240683 r240685 1 2019-01-29 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: expose a way of determining if a detached frontend is for a remote target 4 https://bugs.webkit.org/show_bug.cgi?id=193951 5 <rdar://problem/47621366> 6 7 Reviewed by Joseph Pecoraro. 8 9 * UIProcess/WebInspectorProxy.h: 10 (WebKit::WebInspectorProxy::InspectionTargetType): Added. 11 (WebKit::WebInspectorProxy::createFrontendWindow): 12 * UIProcess/mac/WebInspectorProxyMac.mm: 13 (WebKit::WebInspectorProxy::createFrontendWindow): 14 (WebKit::WebInspectorProxy::platformCreateFrontendWindow): 15 * UIProcess/mac/RemoteWebInspectorProxyMac.mm: 16 (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow): 17 18 * UIProcess/API/Cocoa/_WKInspectorWindow.h: Moved from UIProcess/mac/WKInspectorWindow.h. 19 * UIProcess/API/Cocoa/_WKInspectorWindow.mm: Moved from UIProcess/mac/WKInspectorWindow.mm. 20 (-[WKInspectorWindow isRemote]): Added. 21 22 * Shared/API/Cocoa/_WKNSWindowExtras.mm: 23 (-[NSWindow _web_isWebInspectorWindow]): 24 25 * PlatformMac.cmake: 26 * SourcesCocoa.txt: 27 * UnifiedSources-input.xcfilelist: 28 * WebKit.xcodeproj/project.pbxproj: 29 1 30 2019-01-29 Alex Christensen <achristensen@webkit.org> 2 31 -
trunk/Source/WebKit/PlatformMac.cmake
r240683 r240685 297 297 UIProcess/mac/WKInspectorViewController.mm 298 298 UIProcess/mac/WKInspectorWKWebView.mm 299 UIProcess/mac/WKInspectorWindow.mm300 299 UIProcess/mac/WKPrintingView.mm 301 300 UIProcess/mac/WKSharingServicePickerDelegate.mm -
trunk/Source/WebKit/Shared/API/Cocoa/_WKNSWindowExtras.mm
r226536 r240685 31 31 #if !TARGET_OS_IPHONE 32 32 33 #import " WKInspectorWindow.h"33 #import "_WKInspectorWindow.h" 34 34 35 35 @implementation NSWindow (WKExtras) … … 37 37 - (BOOL)_web_isWebInspectorWindow 38 38 { 39 return [self isKindOfClass:[ WKInspectorWindow class]];39 return [self isKindOfClass:[_WKInspectorWindow class]]; 40 40 } 41 41 -
trunk/Source/WebKit/SourcesCocoa.txt
r240683 r240685 238 238 UIProcess/API/Cocoa/_WKGeolocationPosition.mm 239 239 UIProcess/API/Cocoa/_WKInspector.mm 240 UIProcess/API/Cocoa/_WKInspectorWindow.mm 240 241 UIProcess/API/Cocoa/_WKInternalDebugFeature.mm 241 242 UIProcess/API/Cocoa/_WKLinkIconParameters.mm … … 439 440 UIProcess/mac/WKImmediateActionController.mm 440 441 UIProcess/mac/WKInspectorViewController.mm 441 UIProcess/mac/WKInspectorWindow.mm442 442 UIProcess/mac/WKInspectorWKWebView.mm 443 443 UIProcess/mac/WKPrintingView.mm -
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorWindow.h
r240684 r240685 26 26 #import <WebKit/WKFoundation.h> 27 27 28 #if PLATFORM(MAC) && WK_API_ENABLED28 #if WK_API_ENABLED && !TARGET_OS_IPHONE 29 29 30 @interface WKInspectorWindow : NSWindow 30 WK_CLASS_AVAILABLE(macosx(WK_MAC_TBA)) 31 @interface _WKInspectorWindow : NSWindow 32 33 @property (nonatomic, getter=isForRemoteTarget) BOOL forRemoteTarget; 34 31 35 @end 32 36 -
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorWindow.mm
r240684 r240685 25 25 26 26 #import "config.h" 27 #import " WKInspectorWindow.h"27 #import "_WKInspectorWindow.h" 28 28 29 29 #if PLATFORM(MAC) && WK_API_ENABLED 30 30 31 @implementation WKInspectorWindow 31 @implementation _WKInspectorWindow 32 33 - (BOOL)isForRemoteTarget 34 { 35 return _forRemoteTarget; 36 } 37 32 38 @end 33 39 -
trunk/Source/WebKit/UIProcess/WebInspectorProxy.h
r238771 r240685 106 106 107 107 #if PLATFORM(MAC) && WK_API_ENABLED 108 static RetainPtr<NSWindow> createFrontendWindow(NSRect savedWindowFrame); 108 enum class InspectionTargetType { Local, Remote }; 109 static RetainPtr<NSWindow> createFrontendWindow(NSRect savedWindowFrame, InspectionTargetType); 109 110 110 111 void updateInspectorWindowTitle() const; -
trunk/Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm
r239697 r240685 89 89 [m_inspectorView.get() setDelegate:m_objCAdapter.get()]; 90 90 91 m_window = WebInspectorProxy::createFrontendWindow(NSZeroRect );91 m_window = WebInspectorProxy::createFrontendWindow(NSZeroRect, WebInspectorProxy::InspectionTargetType::Remote); 92 92 [m_window setFrameAutosaveName:@"WKRemoteWebInspectorWindowFrame"]; 93 93 -
trunk/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm
r239647 r240685 31 31 #import "WKInspectorPrivateMac.h" 32 32 #import "WKInspectorViewController.h" 33 #import "WKInspectorWindow.h"34 33 #import "WKViewInternal.h" 35 34 #import "WKWebViewInternal.h" … … 38 37 #import "WebPageProxy.h" 39 38 #import "_WKInspectorInternal.h" 39 #import "_WKInspectorWindow.h" 40 40 #import <SecurityInterface/SFCertificatePanel.h> 41 41 #import <SecurityInterface/SFCertificateView.h> … … 229 229 } 230 230 231 RetainPtr<NSWindow> WebInspectorProxy::createFrontendWindow(NSRect savedWindowFrame )231 RetainPtr<NSWindow> WebInspectorProxy::createFrontendWindow(NSRect savedWindowFrame, InspectionTargetType targetType) 232 232 { 233 233 NSRect windowFrame = !NSIsEmptyRect(savedWindowFrame) ? savedWindowFrame : NSMakeRect(0, 0, initialWindowWidth, initialWindowHeight); 234 auto window = adoptNS([[ WKInspectorWindow alloc] initWithContentRect:windowFrame styleMask:windowStyleMask backing:NSBackingStoreBuffered defer:NO]);234 auto window = adoptNS([[_WKInspectorWindow alloc] initWithContentRect:windowFrame styleMask:windowStyleMask backing:NSBackingStoreBuffered defer:NO]); 235 235 [window setMinSize:NSMakeSize(minimumWindowWidth, minimumWindowHeight)]; 236 236 [window setReleasedWhenClosed:NO]; 237 237 [window setCollectionBehavior:([window collectionBehavior] | NSWindowCollectionBehaviorFullScreenPrimary)]; 238 239 bool forRemoteTarget = targetType == InspectionTargetType::Remote; 240 [window setForRemoteTarget:forRemoteTarget]; 238 241 239 242 CGFloat approximatelyHalfScreenSize = ([window screen].frame.size.width / 2) - 4; … … 283 286 NSRect savedWindowFrame = NSRectFromString(savedWindowFrameString); 284 287 285 m_inspectorWindow = WebInspectorProxy::createFrontendWindow(savedWindowFrame );288 m_inspectorWindow = WebInspectorProxy::createFrontendWindow(savedWindowFrame, InspectionTargetType::Local); 286 289 [m_inspectorWindow setDelegate:m_objCAdapter.get()]; 287 290 -
trunk/Source/WebKit/UnifiedSources-input.xcfilelist
r240683 r240685 447 447 $(SRCROOT)/UIProcess/API/Cocoa/_WKGeolocationPosition.mm 448 448 $(SRCROOT)/UIProcess/API/Cocoa/_WKInspector.mm 449 $(SRCROOT)/UIProcess/API/Cocoa/_WKInspectorWindow.mm 449 450 $(SRCROOT)/UIProcess/API/Cocoa/_WKInternalDebugFeature.mm 450 451 $(SRCROOT)/UIProcess/API/Cocoa/_WKLinkIconParameters.mm … … 719 720 $(SRCROOT)/UIProcess/mac/WKInspectorViewController.mm 720 721 $(SRCROOT)/UIProcess/mac/WKInspectorWKWebView.mm 721 $(SRCROOT)/UIProcess/mac/WKInspectorWindow.mm722 722 $(SRCROOT)/UIProcess/mac/WKPrintingView.mm 723 723 $(SRCROOT)/UIProcess/mac/WKSharingServicePickerDelegate.mm -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r240683 r240685 1308 1308 A58B6F0818FCA733008CBA53 /* WKFileUploadPanel.h in Headers */ = {isa = PBXBuildFile; fileRef = A58B6F0618FCA733008CBA53 /* WKFileUploadPanel.h */; }; 1309 1309 A5C0F0A72000654D00536536 /* _WKNSWindowExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = A5C0F0A62000654400536536 /* _WKNSWindowExtras.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1310 A5C0F0AB2000658200536536 /* WKInspectorWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A5C0F0AA2000656E00536536 /* WKInspectorWindow.h */; };1310 A5C0F0AB2000658200536536 /* _WKInspectorWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A5C0F0AA2000656E00536536 /* _WKInspectorWindow.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1311 1311 A5E391FD2183C1F800C8FB31 /* InspectorTargetProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = A5E391FC2183C1E900C8FB31 /* InspectorTargetProxy.h */; }; 1312 1312 A5EC6AD42151BD7B00677D17 /* WebPageDebuggable.h in Headers */ = {isa = PBXBuildFile; fileRef = A5EC6AD32151BD6900677D17 /* WebPageDebuggable.h */; }; … … 3895 3895 A5C0F0A52000654400536536 /* _WKNSWindowExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKNSWindowExtras.mm; sourceTree = "<group>"; }; 3896 3896 A5C0F0A62000654400536536 /* _WKNSWindowExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKNSWindowExtras.h; sourceTree = "<group>"; }; 3897 A5C0F0A92000656E00536536 /* WKInspectorWindow.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path =WKInspectorWindow.mm; sourceTree = "<group>"; };3898 A5C0F0AA2000656E00536536 /* WKInspectorWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =WKInspectorWindow.h; sourceTree = "<group>"; };3897 A5C0F0A92000656E00536536 /* _WKInspectorWindow.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKInspectorWindow.mm; sourceTree = "<group>"; }; 3898 A5C0F0AA2000656E00536536 /* _WKInspectorWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKInspectorWindow.h; sourceTree = "<group>"; }; 3899 3899 A5D3504D1D78F0D2005124A9 /* RemoteWebInspectorProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteWebInspectorProxyMac.mm; sourceTree = "<group>"; }; 3900 3900 A5E391FB2183C1E900C8FB31 /* InspectorTargetProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorTargetProxy.cpp; sourceTree = "<group>"; }; … … 6050 6050 5CAFDE432130843600B1F7E1 /* _WKInspector.mm */, 6051 6051 5CAFDE442130843600B1F7E1 /* _WKInspectorInternal.h */, 6052 A5C0F0AA2000656E00536536 /* _WKInspectorWindow.h */, 6053 A5C0F0A92000656E00536536 /* _WKInspectorWindow.mm */, 6052 6054 31B362942141EBAD007BFA53 /* _WKInternalDebugFeature.h */, 6053 6055 31B362922141EBAC007BFA53 /* _WKInternalDebugFeature.mm */, … … 8223 8225 994BADF11F7D77EA00B571E7 /* WKInspectorViewController.h */, 8224 8226 994BADF21F7D77EB00B571E7 /* WKInspectorViewController.mm */, 8225 A5C0F0AA2000656E00536536 /* WKInspectorWindow.h */,8226 A5C0F0A92000656E00536536 /* WKInspectorWindow.mm */,8227 8227 A518B5D01FE1D55B00F9FA28 /* WKInspectorWKWebView.h */, 8228 8228 A518B5D11FE1D55B00F9FA28 /* WKInspectorWKWebView.mm */, … … 8864 8864 5CAFDE452130846300B1F7E1 /* _WKInspector.h in Headers */, 8865 8865 5CAFDE472130846A00B1F7E1 /* _WKInspectorInternal.h in Headers */, 8866 A5C0F0AB2000658200536536 /* _WKInspectorWindow.h in Headers */, 8866 8867 31B362952141EBCD007BFA53 /* _WKInternalDebugFeature.h in Headers */, 8867 8868 31B362972141EBD9007BFA53 /* _WKInternalDebugFeatureInternal.h in Headers */,
Note:
See TracChangeset
for help on using the changeset viewer.