NEW 283435
Web Inspector: Remove the unused WebInspector::canAttachWindow and places storing its return value
https://bugs.webkit.org/show_bug.cgi?id=283435
Summary Web Inspector: Remove the unused WebInspector::canAttachWindow and places sto...
Qianlang Chen
Reported 2024-11-20 11:33:01 PST
The patch https://github.com/apple/WebKit/pull/2291 (to bug https://webkit.org/b/283092 or rdar://98891055) made the WebInspector::canAttachWindow function in the web process not useful anymore. The function's return value used to be sent over to the UI process via the WebInspectorUIProxy::OpenLocalFrontend message, where the UI process then decides, using that sent value alongside running platformCanAttach, whether the new inspector window can be attached. However, on macOS, platformCanAttach already computes the same thing as WebInspector::canAttachWindow, and no other implementations of WebInspectorUIProxy make use of the web process's value. Therefore WebInspector::canAttachWindow is now obsolete. Deprecating WebInspector::canAttachWindow could also mean that the m_attached and m_previouslyAttached member variables for both WebInspector and WebInspectorUIProxy all become useless too, so would the webProcessCanAttach parameter of WebInspectorUIProxy::platformCanAttach also become unused. If we can verify that's the case then we should probably remove those too to keep our code clean.
Attachments
Radar WebKit Bug Importer
Comment 1 2024-11-20 11:33:24 PST
Note You need to log in before you can comment on or make changes to this bug.