Web Inspector: Implement console.timeLog
authorpecoraro@apple.com <pecoraro@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Jun 2019 18:36:29 +0000 (18:36 +0000)
committerpecoraro@apple.com <pecoraro@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Jun 2019 18:36:29 +0000 (18:36 +0000)
commite4e83369b01f38572f71685479ba01645da04f73
tree551168bd01cb0b2f30962cb54ccabb85bb99d4f2
parenta2f973898bca4af9e0d0497c9d0d498b40aea042
Web Inspector: Implement console.timeLog
https://bugs.webkit.org/show_bug.cgi?id=199184

Reviewed by Devin Rousso.

Source/JavaScriptCore:

* inspector/JSGlobalObjectConsoleClient.cpp:
(Inspector::JSGlobalObjectConsoleClient::timeLog):
* inspector/JSGlobalObjectConsoleClient.h:
* inspector/agents/InspectorConsoleAgent.cpp:
(Inspector::InspectorConsoleAgent::logTiming):
(Inspector::InspectorConsoleAgent::stopTiming):
* inspector/agents/InspectorConsoleAgent.h:
* runtime/ConsoleClient.h:
* runtime/ConsoleObject.cpp:
(JSC::ConsoleObject::finishCreation):
(JSC::consoleProtoFuncTimeLog):

Source/WebCore:

Updated existing tests.

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::logConsoleTimingImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::logConsoleTiming):
* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::timeLog):
* page/PageConsoleClient.h:
* workers/WorkerConsoleClient.cpp:
(WebCore::WorkerConsoleClient::timeLog):
* workers/WorkerConsoleClient.h:
* worklets/WorkletConsoleClient.cpp:
(WebCore::WorkletConsoleClient::timeLog):
* worklets/WorkletConsoleClient.h:

Source/WebInspectorUI:

* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
Time messages (like timeLog) do not include their messageText
in their parameters list. So to behave more like normal logs
build a parameter list that includes it at the front.

LayoutTests:

* inspector/console/console-time-expected.txt:
* inspector/console/console-time.html:
Add new timeLog tests.

* js/console-expected.txt:
New timeLog method.

* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
Unskip test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/console/console-time-expected.txt
LayoutTests/inspector/console/console-time.html
LayoutTests/js/console-expected.txt
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac/TestExpectations
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp
Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.h
Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp
Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h
Source/JavaScriptCore/runtime/ConsoleClient.h
Source/JavaScriptCore/runtime/ConsoleObject.cpp
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/page/PageConsoleClient.cpp
Source/WebCore/page/PageConsoleClient.h
Source/WebCore/workers/WorkerConsoleClient.cpp
Source/WebCore/workers/WorkerConsoleClient.h
Source/WebCore/worklets/WorkletConsoleClient.cpp
Source/WebCore/worklets/WorkletConsoleClient.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js