WebKit Bugzilla
Attachment 360427 Details for
Bug 193951
: Web Inspector: expose a way of determining if a detached frontend is for a remote target
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
Develop-OpenSource.diff (text/plain), 7.07 KB, created by
Devin Rousso
on 2019-01-28 20:10:24 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-01-28 20:10:24 PST
Size:
7.07 KB
patch
obsolete
>diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 4ab33d8124b..50573d22f9a 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,25 @@ >+2019-01-28 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: expose a way of determining if a detached frontend is for a remote target >+ https://bugs.webkit.org/show_bug.cgi?id=193951 >+ <rdar://problem/47621366> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/WebInspectorProxy.h: >+ (WebKit::WebInspectorProxy::createFrontendWindow): >+ * UIProcess/mac/WebInspectorProxyMac.mm: >+ (WebKit::WebInspectorProxy::createFrontendWindow): >+ (WebKit::WebInspectorProxy::platformCreateFrontendWindow): >+ * UIProcess/mac/RemoteWebInspectorProxyMac.mm: >+ (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow): >+ >+ * UIProcess/mac/WKInspectorWindow.h: >+ * UIProcess/mac/WKInspectorWindow.mm: >+ (-[WKInspectorWindow isRemote]): Added. >+ >+ * WebKit.xcodeproj/project.pbxproj: >+ > 2019-01-28 Antoine Quint <graouts@apple.com> > > Limit user-agent interactions based on the touch-action property on iOS >diff --git a/Source/WebKit/UIProcess/WebInspectorProxy.h b/Source/WebKit/UIProcess/WebInspectorProxy.h >index 3ff7fd45e59..61c65909139 100644 >--- a/Source/WebKit/UIProcess/WebInspectorProxy.h >+++ b/Source/WebKit/UIProcess/WebInspectorProxy.h >@@ -105,7 +105,7 @@ public: > void updateForNewPageProcess(WebPageProxy*); > > #if PLATFORM(MAC) && WK_API_ENABLED >- static RetainPtr<NSWindow> createFrontendWindow(NSRect savedWindowFrame); >+ static RetainPtr<NSWindow> createFrontendWindow(NSRect savedWindowFrame, bool isRemote); > > void updateInspectorWindowTitle() const; > void inspectedViewFrameDidChange(CGFloat = 0); >diff --git a/Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm b/Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm >index ebd6a391643..b0fc940f8c8 100644 >--- a/Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm >+++ b/Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm >@@ -88,7 +88,7 @@ WebPageProxy* RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow() > m_inspectorView = adoptNS([[WKInspectorViewController alloc] initWithInspectedPage:nullptr]); > [m_inspectorView.get() setDelegate:m_objCAdapter.get()]; > >- m_window = WebInspectorProxy::createFrontendWindow(NSZeroRect); >+ m_window = WebInspectorProxy::createFrontendWindow(NSZeroRect, true); > [m_window setFrameAutosaveName:@"WKRemoteWebInspectorWindowFrame"]; > > NSView *contentView = m_window.get().contentView; >diff --git a/Source/WebKit/UIProcess/mac/WKInspectorWindow.h b/Source/WebKit/UIProcess/mac/WKInspectorWindow.h >index 4923e90c791..6a578cb618c 100644 >--- a/Source/WebKit/UIProcess/mac/WKInspectorWindow.h >+++ b/Source/WebKit/UIProcess/mac/WKInspectorWindow.h >@@ -25,9 +25,13 @@ > > #import <WebKit/WKFoundation.h> > >-#if PLATFORM(MAC) && WK_API_ENABLED >+#if WK_API_ENABLED && !TARGET_OS_IPHONE > >+WK_CLASS_AVAILABLE(macosx(WK_MAC_TBA)) > @interface WKInspectorWindow : NSWindow >+ >+@property (nonatomic, getter=isRemote) BOOL remote; >+ > @end > > #endif >diff --git a/Source/WebKit/UIProcess/mac/WKInspectorWindow.mm b/Source/WebKit/UIProcess/mac/WKInspectorWindow.mm >index b04e1c7f9be..7c5e10fb316 100644 >--- a/Source/WebKit/UIProcess/mac/WKInspectorWindow.mm >+++ b/Source/WebKit/UIProcess/mac/WKInspectorWindow.mm >@@ -26,9 +26,15 @@ > #import "config.h" > #import "WKInspectorWindow.h" > >-#if PLATFORM(MAC) && WK_API_ENABLED >+#if WK_API_ENABLED && !TARGET_OS_IPHONE > > @implementation WKInspectorWindow >+ >+- (BOOL)isRemote >+{ >+ return _remote; >+} >+ > @end > > #endif >diff --git a/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm b/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm >index 86ef9453b52..e92eb1217e8 100644 >--- a/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm >+++ b/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm >@@ -228,13 +228,14 @@ void WebInspectorProxy::updateInspectorWindowTitle() const > } > } > >-RetainPtr<NSWindow> WebInspectorProxy::createFrontendWindow(NSRect savedWindowFrame) >+RetainPtr<NSWindow> WebInspectorProxy::createFrontendWindow(NSRect savedWindowFrame, bool isRemote) > { > NSRect windowFrame = !NSIsEmptyRect(savedWindowFrame) ? savedWindowFrame : NSMakeRect(0, 0, initialWindowWidth, initialWindowHeight); > auto window = adoptNS([[WKInspectorWindow alloc] initWithContentRect:windowFrame styleMask:windowStyleMask backing:NSBackingStoreBuffered defer:NO]); > [window setMinSize:NSMakeSize(minimumWindowWidth, minimumWindowHeight)]; > [window setReleasedWhenClosed:NO]; > [window setCollectionBehavior:([window collectionBehavior] | NSWindowCollectionBehaviorFullScreenPrimary)]; >+ [window setRemote:isRemote]; > > CGFloat approximatelyHalfScreenSize = ([window screen].frame.size.width / 2) - 4; > CGFloat minimumFullScreenWidth = std::max<CGFloat>(636, approximatelyHalfScreenSize); >@@ -282,7 +283,7 @@ void WebInspectorProxy::platformCreateFrontendWindow() > NSString *savedWindowFrameString = inspectedPage()->pageGroup().preferences().inspectorWindowFrame(); > NSRect savedWindowFrame = NSRectFromString(savedWindowFrameString); > >- m_inspectorWindow = WebInspectorProxy::createFrontendWindow(savedWindowFrame); >+ m_inspectorWindow = WebInspectorProxy::createFrontendWindow(savedWindowFrame, false); > [m_inspectorWindow setDelegate:m_objCAdapter.get()]; > > WKWebView *inspectorView = [m_inspectorViewController webView]; >diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj >index ed3d4e193fa..6ef6e1f72d5 100644 >--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj >+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj >@@ -1306,7 +1306,7 @@ > A55BA8351BA3E70A007CD33D /* WebInspectorFrontendAPIDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = A55BA8331BA3E6FA007CD33D /* WebInspectorFrontendAPIDispatcher.h */; }; > A58B6F0818FCA733008CBA53 /* WKFileUploadPanel.h in Headers */ = {isa = PBXBuildFile; fileRef = A58B6F0618FCA733008CBA53 /* WKFileUploadPanel.h */; }; > A5C0F0A72000654D00536536 /* _WKNSWindowExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = A5C0F0A62000654400536536 /* _WKNSWindowExtras.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- A5C0F0AB2000658200536536 /* WKInspectorWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A5C0F0AA2000656E00536536 /* WKInspectorWindow.h */; }; >+ A5C0F0AB2000658200536536 /* WKInspectorWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A5C0F0AA2000656E00536536 /* WKInspectorWindow.h */; settings = {ATTRIBUTES = (Private, ); }; }; > A5E391FD2183C1F800C8FB31 /* InspectorTargetProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = A5E391FC2183C1E900C8FB31 /* InspectorTargetProxy.h */; }; > A5EC6AD42151BD7B00677D17 /* WebPageDebuggable.h in Headers */ = {isa = PBXBuildFile; fileRef = A5EC6AD32151BD6900677D17 /* WebPageDebuggable.h */; }; > A5EFD38C16B0E88C00B2F0E8 /* WKPageVisibilityTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = A5EFD38B16B0E88C00B2F0E8 /* WKPageVisibilityTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
bburg
:
review-
bburg
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193951
:
360427
|
360443
|
360445