Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 5bb44c8b1c3b4f3d3c289625412e57a0f6037f50 https://github.com/WebKit/WebKit/commit/5bb44c8b1c3b4f3d3c289625412e57a0f6037f50 Author: David Quesada <david_ques...@apple.com> Date: 2023-01-25 (Wed, 25 Jan 2023)
Changed paths: M Source/WebKit/UIProcess/API/Cocoa/_WKInspectorWindow.h M Source/WebKit/UIProcess/API/Cocoa/_WKInspectorWindow.mm A Source/WebKit/UIProcess/API/Cocoa/_WKInspectorWindowInternal.h M Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.h M Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm M Source/WebKit/WebKit.xcodeproj/project.pbxproj Log Message: ----------- Expose the inspected web view from _WKInspectorWindow https://bugs.webkit.org/show_bug.cgi?id=251140 rdar://104628163 Reviewed by Patrick Angle. Introduce _WKInspectorWindow.inspectedWebView to read the web view inspected by the inspector hosted in a _WKInspectorWindow. * Source/WebKit/UIProcess/API/Cocoa/_WKInspectorWindow.h: * Source/WebKit/UIProcess/API/Cocoa/_WKInspectorWindow.mm: Let the compiler automatically synthesize the properties. Manually implementing them doesn't provide any benefit. (-[_WKInspectorWindow isForRemoteTarget]): Deleted. * Source/WebKit/UIProcess/API/Cocoa/_WKInspectorWindowInternal.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKInspectorWindow.h. As minor cleanup, add an internal header to redeclare the SPI as readwrite instead of exposing the properties as writable to WebKit clients who import the main header. * Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.h: Add an optional parameter to createFrontendWindow() to specify a WebPageProxy being inspected. This will be used to populate the new `inspectedWebView` property. (WebKit::WebInspectorUIProxy::inspectorWindow const): Deleted. Remove this method. It wasn't being used anywhere. * Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm: (WebKit::WebInspectorUIProxy::createFrontendWindow): If an inspected WebPageProxy was provided, look up the WKWebView to assign to _WKInspectorWindow.inspectedWebView. (WebKit::WebInspectorUIProxy::platformCreateFrontendWindow): Pass the inspected page to createFrontendWindow(). * Source/WebKit/WebKit.xcodeproj/project.pbxproj: Add reference to _WKInspectorWindowInternal.h. Canonical link: https://commits.webkit.org/259393@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes