Web Inspector: create additional command line api functions for other console methods
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Aug 2019 00:46:56 +0000 (00:46 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Aug 2019 00:46:56 +0000 (00:46 +0000)
commit3de562910f66a37c57523ed4c256052974acf21b
tree57a90708dfb3d6cd587bd24be5dc204cfdefa18b
parent0fc95a090cdf34175b75d6f592c3795e839a77a0
Web Inspector: create additional command line api functions for other console methods
https://bugs.webkit.org/show_bug.cgi?id=200971

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Expose all `console.*` functions in the command line API, since they're all already able to
be referenced via the `console` object.

Provide a simpler interface for other injected scripts to modify the command line API.

* inspector/InjectedScriptModule.cpp:
(Inspector::InjectedScriptModule::ensureInjected):

* inspector/InjectedScriptSource.js:
(InjectedScript.prototype.inspectObject):
(InjectedScript.prototype.addCommandLineAPIGetter): Added.
(InjectedScript.prototype.addCommandLineAPIMethod): Added.
(InjectedScript.prototype.hasInjectedModule): Added.
(InjectedScript.prototype.injectModule):
(InjectedScript.prototype._evaluateOn):
(InjectedScript.CommandLineAPI): Added.
(InjectedScript.prototype.module): Deleted.
(InjectedScript.prototype._savedResult): Deleted.
(bind): Deleted.
(BasicCommandLineAPI): Deleted.
(clear): Deleted.
(table): Deleted.
(profile): Deleted.
(profileEnd): Deleted.
(keys): Deleted.
(values): Deleted.
(queryInstances): Deleted.
(queryObjects): Deleted.
(queryHolders): Deleted.

Source/WebCore:

Expose all `console.*` functions in the command line API, since they're all already able to
be referenced via the `console` object.

Provide a simpler interface for other injected scripts to modify the command line API.

* inspector/CommandLineAPIModuleSource.js:
(injectedScript._inspectObject): Added.
(normalizeEventTypes): Added.
(logEvent): Added.
(canQuerySelectorOnNode): Added.
(bind): Deleted.
(value): Deleted.
(this.method.toString): Deleted.
(CommandLineAPI): Deleted.
(CommandLineAPIImpl): Deleted.
(CommandLineAPIImpl.prototype): Deleted.
(CommandLineAPIImpl.prototype._canQuerySelectorOnNode): Deleted.
(CommandLineAPIImpl.prototype.x): Deleted.
(CommandLineAPIImpl.prototype.dir): Deleted.
(CommandLineAPIImpl.prototype.dirxml): Deleted.
(CommandLineAPIImpl.prototype.keys): Deleted.
(CommandLineAPIImpl.prototype.values): Deleted.
(CommandLineAPIImpl.prototype.profile): Deleted.
(CommandLineAPIImpl.prototype.profileEnd): Deleted.
(CommandLineAPIImpl.prototype.table): Deleted.
(CommandLineAPIImpl.prototype.screenshot): Deleted.
(CommandLineAPIImpl.prototype.monitorEvents): Deleted.
(CommandLineAPIImpl.prototype.unmonitorEvents): Deleted.
(CommandLineAPIImpl.prototype.inspect): Deleted.
(CommandLineAPIImpl.prototype.queryInstances): Deleted.
(CommandLineAPIImpl.prototype.queryObjects): Deleted.
(CommandLineAPIImpl.prototype.queryHolders): Deleted.
(CommandLineAPIImpl.prototype.copy): Deleted.
(CommandLineAPIImpl.prototype.clear): Deleted.
(CommandLineAPIImpl.prototype.getEventListeners): Deleted.
(CommandLineAPIImpl.prototype._inspectedObject): Deleted.
(CommandLineAPIImpl.prototype._normalizeEventTypes): Deleted.
(CommandLineAPIImpl.prototype._logEvent): Deleted.
(CommandLineAPIImpl.prototype._inspect): Deleted.

Source/WebInspectorUI:

Expose all `console.*` functions in the command line API, since they're all already able to
be referenced via the `console` object.

Provide a simpler interface for other injected scripts to modify the command line API.

* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider.prototype.get _commandLineAPIKeys): Added.
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.updateLastPropertyNames):
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames):

LayoutTests:

* http/tests/inspector/dom/cross-domain-inspected-node-access-expected.txt:
* inspector/console/command-line-api-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/dom/cross-domain-inspected-node-access-expected.txt
LayoutTests/inspector/console/command-line-api-expected.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/InjectedScriptModule.cpp
Source/JavaScriptCore/inspector/InjectedScriptSource.js
Source/WebCore/ChangeLog
Source/WebCore/inspector/CommandLineAPIModuleSource.js
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js