WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
230573
[Cocoa] backport showConsole() and showResources() for RemoteWebInspectorUI
https://bugs.webkit.org/show_bug.cgi?id=230573
Summary
[Cocoa] backport showConsole() and showResources() for RemoteWebInspectorUI
Blaze Burg
Reported
2021-09-21 13:12:33 PDT
.
Attachments
Patch v1.0
(8.21 KB, patch)
2021-09-21 13:46 PDT
,
Blaze Burg
no flags
Details
Formatted Diff
Diff
Patch v1.1
(17.29 KB, patch)
2021-09-21 16:33 PDT
,
Blaze Burg
no flags
Details
Formatted Diff
Diff
Patch v1.2
(17.16 KB, patch)
2021-09-22 08:26 PDT
,
Blaze Burg
hi
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-09-21 13:13:45 PDT
<
rdar://problem/83365814
>
Blaze Burg
Comment 2
2021-09-21 13:14:57 PDT
In the process of writing an API test for _WKInspectorExtensionDelegate, I realized that there is no way to reliably select extension tabs and select non-extension tabs. For the purposes of testing (and future API unification), we should hoist showResources() and showConsole() to the _WKInspectorExtensionHost protocol.
Blaze Burg
Comment 3
2021-09-21 13:46:05 PDT
Created
attachment 438850
[details]
Patch v1.0
Patrick Angle
Comment 4
2021-09-21 14:17:37 PDT
Comment on
attachment 438850
[details]
Patch v1.0 View in context:
https://bugs.webkit.org/attachment.cgi?id=438850&action=review
> Source/WebKit/ChangeLog:19 > + * UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: > + Hoist showResources() and showConsole() to this shared protocol. > + This doesn't really have anything to do with extensions, but it will > + suffice until a more generic protocol is created for APIs that should > + exist for both _WKInspector and _WKInspectorRemoteViewController.
It is a shame that we don't have a separate generic protocol for this stuff yet, particularly given that `close` is already declared here, which also isn't directly extension related either. I'm torn on perpetuating this misdirection further. Is there any reason we either go ahead and create that more generic protocol or rename this protocol to better reflect what it is?
Blaze Burg
Comment 5
2021-09-21 16:33:16 PDT
Created
attachment 438884
[details]
Patch v1.1
Blaze Burg
Comment 6
2021-09-21 19:11:17 PDT
(In reply to Patrick Angle from
comment #4
)
> Comment on
attachment 438850
[details]
> Patch v1.0 > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=438850&action=review
> > > Source/WebKit/ChangeLog:19 > > + * UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: > > + Hoist showResources() and showConsole() to this shared protocol. > > + This doesn't really have anything to do with extensions, but it will > > + suffice until a more generic protocol is created for APIs that should > > + exist for both _WKInspector and _WKInspectorRemoteViewController. > > It is a shame that we don't have a separate generic protocol for this stuff > yet, particularly given that `close` is already declared here, which also > isn't directly extension related either. I'm torn on perpetuating this > misdirection further. Is there any reason we either go ahead and create that > more generic protocol or rename this protocol to better reflect what it is?
The new patch v1.1 incorporates this suggestion.
Patrick Angle
Comment 7
2021-09-21 22:06:27 PDT
Comment on
attachment 438884
[details]
Patch v1.1 View in context:
https://bugs.webkit.org/attachment.cgi?id=438884&action=review
Provisional r+ from me
> Source/WebKit/WebKit.xcodeproj/project.pbxproj:6 > + objectVersion = 54;
Probably don’t want to increment this? I imagine we will want to do that in a separate bug and across the entire project even if this is intended. I know this has caused issues on older Xcode versions in the past.
Blaze Burg
Comment 8
2021-09-22 08:26:40 PDT
Created
attachment 438951
[details]
Patch v1.2 Latest patch v1.2 addresses all comments to date.
Devin Rousso
Comment 9
2021-09-22 11:27:36 PDT
Comment on
attachment 438951
[details]
Patch v1.2 View in context:
https://bugs.webkit.org/attachment.cgi?id=438951&action=review
> Source/WebKit/UIProcess/API/Cocoa/_WKInspectorIBActions.h:46 > + * This will open the associated Web Inspector if it is not already open.
Is this actually true?
> Source/WebKit/UIProcess/API/Cocoa/_WKInspectorIBActions.h:52 > + * This will open the associated Web Inspector if it is not already open.
ditto (:46)
Blaze Burg
Comment 10
2021-09-24 13:33:48 PDT
(In reply to Devin Rousso from
comment #9
)
> Comment on
attachment 438951
[details]
> Patch v1.2 > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=438951&action=review
> > > Source/WebKit/UIProcess/API/Cocoa/_WKInspectorIBActions.h:46 > > + * This will open the associated Web Inspector if it is not already open. > > Is this actually true? > > > Source/WebKit/UIProcess/API/Cocoa/_WKInspectorIBActions.h:52 > > + * This will open the associated Web Inspector if it is not already open. > > ditto (:46)
No. I have removed the comment in the newest patch version. Most of the IBActions have no effect unless the inspector frontend is loaded. Ultimately they will wait for frontend to finish loading in InspectorFrontendAPIDispatcher. It is recommended for API users to call -show before doing more things with _WKInspector.
Devin Rousso
Comment 11
2021-09-24 14:07:14 PDT
Comment on
attachment 438951
[details]
Patch v1.2 View in context:
https://bugs.webkit.org/attachment.cgi?id=438951&action=review
r=me based on described changes to API doc
>>> Source/WebKit/UIProcess/API/Cocoa/_WKInspectorIBActions.h:46 >>> + * This will open the associated Web Inspector if it is not already open. >> >> Is this actually true? > > No. I have removed the comment in the newest patch version. > > Most of the IBActions have no effect unless the inspector frontend is loaded. Ultimately they will wait for frontend to finish loading in InspectorFrontendAPIDispatcher. > > It is recommended for API users to call -show before doing more things with _WKInspector.
Gotcha. That sounds fine :)
Blaze Burg
Comment 12
2021-09-27 09:19:15 PDT
Committed
r283119
(
242177@main
): <
https://commits.webkit.org/242177@main
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug