<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[246798] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/246798">246798</a></dd>
<dt>Author</dt> <dd>pecoraro@apple.com</dd>
<dt>Date</dt> <dd>2019-06-25 11:36:29 -0700 (Tue, 25 Jun 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>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.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsinspectorconsoleconsoletimeexpectedtxt">trunk/LayoutTests/inspector/console/console-time-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorconsoleconsoletimehtml">trunk/LayoutTests/inspector/console/console-time.html</a></li>
<li><a href="#trunkLayoutTestsjsconsoleexpectedtxt">trunk/LayoutTests/js/console-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorJSGlobalObjectConsoleClientcpp">trunk/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorJSGlobalObjectConsoleClienth">trunk/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorConsoleAgentcpp">trunk/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorConsoleAgenth">trunk/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeConsoleClienth">trunk/Source/JavaScriptCore/runtime/ConsoleClient.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeConsoleObjectcpp">trunk/Source/JavaScriptCore/runtime/ConsoleObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorInstrumentationcpp">trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorInstrumentationh">trunk/Source/WebCore/inspector/InspectorInstrumentation.h</a></li>
<li><a href="#trunkSourceWebCorepagePageConsoleClientcpp">trunk/Source/WebCore/page/PageConsoleClient.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageConsoleClienth">trunk/Source/WebCore/page/PageConsoleClient.h</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerConsoleClientcpp">trunk/Source/WebCore/workers/WorkerConsoleClient.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerConsoleClienth">trunk/Source/WebCore/workers/WorkerConsoleClient.h</a></li>
<li><a href="#trunkSourceWebCoreworkletsWorkletConsoleClientcpp">trunk/Source/WebCore/worklets/WorkletConsoleClient.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkletsWorkletConsoleClienth">trunk/Source/WebCore/worklets/WorkletConsoleClient.h</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsConsoleMessageViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/LayoutTests/ChangeLog 2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2019-06-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Implement console.timeLog
+        https://bugs.webkit.org/show_bug.cgi?id=199184
+
+        Reviewed by Devin Rousso.
+
+        * 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.
+
</ins><span class="cx"> 2019-06-25  Fujii Hironori  <Hironori.Fujii@sony.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed test gardening
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsoleconsoletimeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/console-time-expected.txt (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/console-time-expected.txt    2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/LayoutTests/inspector/console/console-time-expected.txt       2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -1,8 +1,8 @@
</span><del>-Tests for the console.time and console.timeEnd APIs.
</del><ins>+Tests for the console.time, console.timeLog, and console.timeEnd APIs.
</ins><span class="cx"> 
</span><span class="cx"> 
</span><del>-== Running test suite: console.time and console.timeEnd
--- Running test case: DefaultLabel
</del><ins>+== Running test suite: console.time
+-- Running test case: console.time.DefaultLabel
</ins><span class="cx"> PASS: Should receive a Timing type message.
</span><span class="cx"> PASS: Message should contain the 'default' label name somewhere.
</span><span class="cx"> PASS: Should receive a Timing type message.
</span><span class="lines">@@ -9,24 +9,59 @@
</span><span class="cx"> PASS: Message should contain the 'default' label name somewhere.
</span><span class="cx"> PASS: Should receive a Timing type message.
</span><span class="cx"> PASS: Message should contain the 'default' label name somewhere.
</span><ins>+PASS: Should receive a Timing type message.
+PASS: Message should contain the 'default' label name somewhere.
+PASS: Should receive a Timing type message.
+PASS: Message should contain the 'default' label name somewhere.
+PASS: Should receive a Timing type message.
+PASS: Message should contain the 'default' label name somewhere.
</ins><span class="cx"> 
</span><del>--- Running test case: UserLabels
</del><ins>+-- Running test case: console.time.UserLabels
</ins><span class="cx"> PASS: Should receive a Timing type message.
</span><span class="cx"> PASS: Message should contain the 'my-label' label name somewhere.
</span><ins>+PASS: Should receive a Timing type message.
+PASS: Message should contain the 'my-label' label name somewhere.
</ins><span class="cx"> 
</span><del>--- Running test case: MultipleTimers
</del><ins>+-- Running test case: console.time.MultipleTimers
</ins><span class="cx"> PASS: Should receive a Timing type message.
</span><span class="cx"> PASS: Message should contain the 'my-label-2' label name somewhere.
</span><span class="cx"> PASS: Should receive a Timing type message.
</span><span class="cx"> PASS: Message should contain the 'my-label-1' label name somewhere.
</span><span class="cx"> 
</span><del>--- Running test case: WarnWhenExisting
</del><ins>+-- Running test case: console.time.WarnWhenExisting
</ins><span class="cx"> PASS: Should receive a Timing type message.
</span><span class="cx"> PASS: Should receive a Warning level message
</span><span class="cx"> PASS: Message should contain the 'default' label name somewhere.
</span><span class="cx"> 
</span><del>--- Running test case: WarnWhenNotExisting
</del><ins>+-- Running test case: console.time.WarnWhenNotExisting
</ins><span class="cx"> PASS: Should receive a Timing type message.
</span><span class="cx"> PASS: Should receive a Warning level message.
</span><span class="cx"> PASS: Message should contain the 'default' label name somewhere.
</span><ins>+PASS: Should receive a Timing type message.
+PASS: Should receive a Warning level message.
+PASS: Message should contain the 'default' label name somewhere.
</ins><span class="cx"> 
</span><ins>+-- Running test case: console.time.TimeLogIncreasing
+PASS: Should receive a Timing type message.
+PASS: Message should contain the 'my-timelog-label' label name somewhere.
+PASS: + Initial timer time seen.
+PASS: Should receive a Timing type message.
+PASS: Message should contain the 'my-timelog-label' label name somewhere.
+PASS: + Timer time should be increasing.
+PASS: Should receive a Timing type message.
+PASS: Message should contain the 'my-timelog-label' label name somewhere.
+PASS: + Timer time should be increasing.
+PASS: Should receive a Timing type message.
+PASS: Message should contain the 'my-timelog-label' label name somewhere.
+PASS: + Timer time should be increasing.
+
+-- Running test case: console.time.TimeLogArguments
+PASS: Should receive a Timing type message.
+PASS: timeLog should contain no parameters
+PASS: Should receive a Timing type message.
+PASS: timeLog should contain 1 parameters
+PASS: Should receive a Timing type message.
+PASS: timeLog should contain 2 parameters
+PASS: Should receive a Timing type message.
+PASS: timeEnd should contain no parameters
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorconsoleconsoletimehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/console-time.html (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/console-time.html    2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/LayoutTests/inspector/console/console-time.html       2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -3,16 +3,22 @@
</span><span class="cx"> <head>
</span><span class="cx"> <script src="../../http/tests/inspector/resources/inspector-test.js"></script>
</span><span class="cx"> <script>
</span><ins>+function sleepTick() {
+    let now = performance.now();
+    let until = now + 10;
+    while (performance.now() < until);
+}
+
</ins><span class="cx"> function test()
</span><span class="cx"> {
</span><del>-    let suite = InspectorTest.createAsyncSuite("console.time and console.timeEnd");
</del><ins>+    let suite = InspectorTest.createAsyncSuite("console.time");
</ins><span class="cx"> 
</span><span class="cx">     suite.addTestCase({
</span><del>-        name: "DefaultLabel",
</del><ins>+        name: "console.time.DefaultLabel",
</ins><span class="cx">         description: "Test that default label works as expected.",
</span><span class="cx">         test(resolve, reject) {
</span><span class="cx">             let seen = 0;
</span><del>-            const expected = 3;
</del><ins>+            const expected = 6;
</ins><span class="cx">             WI.consoleManager.addEventListener(WI.ConsoleManager.Event.MessageAdded, handler);
</span><span class="cx">             function handler(event) {
</span><span class="cx">                 let message = event.data.message;
</span><span class="lines">@@ -24,36 +30,45 @@
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            InspectorTest.evaluateInPage("console.time()");
-            InspectorTest.evaluateInPage("console.timeEnd()");
</del><ins>+            InspectorTest.evaluateInPage(`console.time()`);
+            InspectorTest.evaluateInPage(`console.timeLog()`);
+            InspectorTest.evaluateInPage(`console.timeEnd()`);
</ins><span class="cx"> 
</span><del>-            InspectorTest.evaluateInPage("console.time(undefined)");
-            InspectorTest.evaluateInPage("console.timeEnd('default')");
</del><ins>+            InspectorTest.evaluateInPage(`console.time(undefined)`);
+            InspectorTest.evaluateInPage(`console.timeLog('default')`);
+            InspectorTest.evaluateInPage(`console.timeEnd('default')`);
</ins><span class="cx"> 
</span><del>-            InspectorTest.evaluateInPage("console.time('default')");
-            InspectorTest.evaluateInPage("console.timeEnd(undefined)");
</del><ins>+            InspectorTest.evaluateInPage(`console.time('default')`);
+            InspectorTest.evaluateInPage(`console.timeLog(undefined)`);
+            InspectorTest.evaluateInPage(`console.timeEnd(undefined)`);
</ins><span class="cx">         }
</span><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     suite.addTestCase({
</span><del>-        name: "UserLabels",
</del><ins>+        name: "console.time.UserLabels",
</ins><span class="cx">         description: "Test that user labels works as expected.",
</span><span class="cx">         test(resolve, reject) {
</span><del>-            WI.consoleManager.awaitEvent(WI.ConsoleManager.Event.MessageAdded)
-            .then((event) => {
</del><ins>+            let seen = 0;
+            const expected = 2;
+            WI.consoleManager.addEventListener(WI.ConsoleManager.Event.MessageAdded, handler);
+            function handler(event) {
</ins><span class="cx">                 let message = event.data.message;
</span><span class="cx">                 InspectorTest.expectThat(message.type === WI.ConsoleMessage.MessageType.Timing, "Should receive a Timing type message.");
</span><span class="cx">                 InspectorTest.expectThat(message.messageText.includes("my-label"), "Message should contain the 'my-label' label name somewhere.");
</span><del>-            })
-            .then(resolve, reject);
</del><ins>+                if (++seen === expected) {
+                    WI.consoleManager.removeEventListener(WI.ConsoleManager.Event.MessageAdded, handler);
+                    resolve();
+                }
+            }
</ins><span class="cx"> 
</span><del>-            InspectorTest.evaluateInPage("console.time('my-label')");
-            InspectorTest.evaluateInPage("console.timeEnd('my-label')");
</del><ins>+            InspectorTest.evaluateInPage(`console.time('my-label')`);
+            InspectorTest.evaluateInPage(`console.timeLog('my-label')`);
+            InspectorTest.evaluateInPage(`console.timeEnd('my-label')`);
</ins><span class="cx">         }
</span><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     suite.addTestCase({
</span><del>-        name: "MultipleTimers",
</del><ins>+        name: "console.time.MultipleTimers",
</ins><span class="cx">         description: "Test that multiple timers running at the same time work as expected.",
</span><span class="cx">         test(resolve, reject) {
</span><span class="cx">             let seen = 0;
</span><span class="lines">@@ -70,15 +85,15 @@
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            InspectorTest.evaluateInPage("console.time('my-label-1')");
-            InspectorTest.evaluateInPage("console.time('my-label-2')");
-            InspectorTest.evaluateInPage("console.timeEnd('my-label-2')");
-            InspectorTest.evaluateInPage("console.timeEnd('my-label-1')");
</del><ins>+            InspectorTest.evaluateInPage(`console.time('my-label-1')`);
+            InspectorTest.evaluateInPage(`console.time('my-label-2')`);
+            InspectorTest.evaluateInPage(`console.timeEnd('my-label-2')`);
+            InspectorTest.evaluateInPage(`console.timeEnd('my-label-1')`);
</ins><span class="cx">         }
</span><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     suite.addTestCase({
</span><del>-        name: "WarnWhenExisting",
</del><ins>+        name: "console.time.WarnWhenExisting",
</ins><span class="cx">         description: "Test for a warning when trying to start an already started timer.",
</span><span class="cx">         test(resolve, reject) {
</span><span class="cx">             WI.consoleManager.addEventListener(WI.ConsoleManager.Event.MessageAdded, handler);
</span><span class="lines">@@ -96,34 +111,122 @@
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            InspectorTest.evaluateInPage("console.time()");
-            InspectorTest.evaluateInPage("console.time()"); // Warning
-            InspectorTest.evaluateInPage("console.timeEnd()");
</del><ins>+            InspectorTest.evaluateInPage(`console.time()`);
+            InspectorTest.evaluateInPage(`console.time()`); // Warning
+            InspectorTest.evaluateInPage(`console.timeEnd()`);
</ins><span class="cx">         }
</span><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     suite.addTestCase({
</span><del>-        name: "WarnWhenNotExisting",
</del><ins>+        name: "console.time.WarnWhenNotExisting",
</ins><span class="cx">         description: "Test for a warning when trying to start an already started timer.",
</span><span class="cx">         test(resolve, reject) {
</span><del>-            WI.consoleManager.awaitEvent(WI.ConsoleManager.Event.MessageAdded)
-            .then((event) => {
</del><ins>+            let seen = 0;
+            const expected = 2;
+            WI.consoleManager.addEventListener(WI.ConsoleManager.Event.MessageAdded, handler);
+            function handler(event) {
</ins><span class="cx">                 let message = event.data.message;
</span><ins>+                if (message.type === WI.ConsoleMessage.MessageType.Clear)
+                    return;
+
</ins><span class="cx">                 InspectorTest.expectThat(message.type === WI.ConsoleMessage.MessageType.Timing, "Should receive a Timing type message.");
</span><span class="cx">                 InspectorTest.expectThat(message.level === WI.ConsoleMessage.MessageLevel.Warning, "Should receive a Warning level message.");
</span><span class="cx">                 InspectorTest.expectThat(message.messageText.includes("default"), "Message should contain the 'default' label name somewhere.");
</span><del>-            })
-            .then(resolve, reject);
</del><ins>+                if (++seen === expected) {
+                    WI.consoleManager.removeEventListener(WI.ConsoleManager.Event.MessageAdded, handler);
+                    resolve();
+                }
+            }
</ins><span class="cx"> 
</span><del>-            InspectorTest.evaluateInPage("console.timeEnd()");
</del><ins>+            InspectorTest.evaluateInPage(`console.timeLog()`); // Warn
+            InspectorTest.evaluateInPage(`console.clear()`);
+            InspectorTest.evaluateInPage(`console.timeEnd()`); // Warn
</ins><span class="cx">         }
</span><span class="cx">     });
</span><span class="cx"> 
</span><ins>+    suite.addTestCase({
+        name: "console.time.TimeLogIncreasing",
+        description: "Test for timeLog multiple times with a timer should increase.",
+        test(resolve, reject) {
+            let lastTime = 0;
+            let seen = 0;
+            const expected = 4;
+            WI.consoleManager.addEventListener(WI.ConsoleManager.Event.MessageAdded, handler);
+            function handler(event) {
+                let message = event.data.message;
+                InspectorTest.expectThat(message.type === WI.ConsoleMessage.MessageType.Timing, "Should receive a Timing type message.");
+                InspectorTest.expectThat(message.messageText.includes("my-timelog-label"), "Message should contain the 'my-timelog-label' label name somewhere.");
+
+                let match = message.messageText.match(/^my-timelog-label: (\d+(\.\d+)?ms)/)
+                if (match) {
+                    let currentTime = parseFloat(match[1]);
+                    if (lastTime) {
+                        InspectorTest.assert(currentTime > 15, "At least 15 milliseconds should have elapsed since this is for timeLog 2 and later.");
+                        InspectorTest.expectGreaterThan(currentTime, lastTime, "+ Timer time should be increasing.");
+                    } else
+                        InspectorTest.pass("+ Initial timer time seen.");
+                    lastTime = currentTime;
+                }
+
+                if (++seen === expected) {
+                    WI.consoleManager.removeEventListener(WI.ConsoleManager.Event.MessageAdded, handler);
+                    resolve();
+                }
+            }
+
+            InspectorTest.evaluateInPage(`console.time("my-timelog-label")`);
+            InspectorTest.evaluateInPage(`sleepTick(); console.timeLog("my-timelog-label")`);
+            InspectorTest.evaluateInPage(`sleepTick(); console.timeLog("my-timelog-label")`);
+            InspectorTest.evaluateInPage(`sleepTick(); console.timeLog("my-timelog-label")`);
+            InspectorTest.evaluateInPage(`sleepTick(); console.timeEnd("my-timelog-label")`);
+        }
+    });
+
+    suite.addTestCase({
+        name: "console.time.TimeLogArguments",
+        description: "Test for timeLog with trailing parameters.",
+        test(resolve, reject) {
+            let seen = 0;
+            const expected = 4;
+            WI.consoleManager.addEventListener(WI.ConsoleManager.Event.MessageAdded, handler);
+            function handler(event) {
+                let message = event.data.message;
+                InspectorTest.expectThat(message.type === WI.ConsoleMessage.MessageType.Timing, "Should receive a Timing type message.");
+
+                switch (seen) {
+                case 0:
+                    InspectorTest.expectEqual(message.parameters, undefined, "timeLog should contain no parameters");
+                    break;
+                case 1:
+                    InspectorTest.expectEqual(message.parameters.length, 1, "timeLog should contain 1 parameters");
+                    break;
+                case 2:
+                    InspectorTest.expectEqual(message.parameters.length, 2, "timeLog should contain 2 parameters");
+                    break;
+                case 3:
+                    InspectorTest.expectEqual(message.parameters, undefined, "timeEnd should contain no parameters");
+                    break;
+                }
+
+                if (++seen === expected) {
+                    WI.consoleManager.removeEventListener(WI.ConsoleManager.Event.MessageAdded, handler);
+                    resolve();
+                }
+            }
+
+            InspectorTest.evaluateInPage(`console.time("x")`);
+            InspectorTest.evaluateInPage(`console.timeLog("x")`);
+            InspectorTest.evaluateInPage(`console.timeLog("x", 1)`);
+            InspectorTest.evaluateInPage(`console.timeLog("x", 2, window)`);
+            InspectorTest.evaluateInPage(`console.timeEnd("x")`);
+        }
+    });
+
</ins><span class="cx">     suite.runTestCasesAndFinish();
</span><span class="cx"> }
</span><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <body onload="runTest()">
</span><del>-<p>Tests for the console.time and console.timeEnd APIs.</p>
</del><ins>+<p>Tests for the console.time, console.timeLog, and console.timeEnd APIs.</p>
</ins><span class="cx"> </body>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="trunkLayoutTestsjsconsoleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/console-expected.txt (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/console-expected.txt        2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/LayoutTests/js/console-expected.txt   2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -121,6 +121,13 @@
</span><span class="cx"> PASS descriptor.writable is true
</span><span class="cx"> PASS descriptor.enumerable is true
</span><span class="cx"> 
</span><ins>+console.timeLog
+PASS typeof console.timeLog is "function"
+PASS console.timeLog.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
</ins><span class="cx"> console.timeEnd
</span><span class="cx"> PASS typeof console.timeEnd is "function"
</span><span class="cx"> PASS console.timeEnd.length is 0
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations  2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/LayoutTests/platform/gtk/TestExpectations     2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -2135,8 +2135,6 @@
</span><span class="cx"> webkit.org/b/197498 imported/w3c/web-platform-tests/web-animations/interfaces/Animation/ready.html [ Failure Pass ]
</span><span class="cx"> webkit.org/b/197498 imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events.html [ Failure Pass ]
</span><span class="cx"> 
</span><del>-webkit.org/b/197499 inspector/console/console-time.html [ Failure Pass ]
-
</del><span class="cx"> webkit.org/b/197500 legacy-animation-engine/compositing/repaint/become-overlay-composited-layer.html [ Failure Pass ]
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/197501 fast/images/animated-webp.html [ ImageOnlyFailure Pass ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations  2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/LayoutTests/platform/mac/TestExpectations     2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -1089,7 +1089,6 @@
</span><span class="cx"> webkit.org/b/143719 inspector/console/console-api.html [ Pass Timeout ]
</span><span class="cx"> webkit.org/b/156078 inspector/console/heapSnapshot.html [ Pass Timeout ]
</span><span class="cx"> webkit.org/b/182620 inspector/console/clearMessages.html [ Pass Timeout ]
</span><del>-webkit.org/b/158006 inspector/console/console-time.html [ Pass Failure ]
</del><span class="cx"> webkit.org/b/183880 [ Debug ] inspector/console/messageAdded-from-named-evaluations.html [ Slow ]
</span><span class="cx"> webkit.org/b/156634 inspector/formatting/formatting-javascript.html [ Pass Timeout ]
</span><span class="cx"> webkit.org/b/158948 inspector/timeline [ Pass Timeout ]
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog    2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/JavaScriptCore/ChangeLog       2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2019-06-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Implement console.timeLog
+        https://bugs.webkit.org/show_bug.cgi?id=199184
+
+        Reviewed by Devin Rousso.
+
+        * 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):
+
</ins><span class="cx"> 2019-06-25  Michael Catanzaro  <mcatanzaro@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         REGRESSION(r245586): static assertion failed: Match result and EncodedMatchResult should be the same size
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorJSGlobalObjectConsoleClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp    2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp       2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -153,6 +153,11 @@
</span><span class="cx">     m_consoleAgent->startTiming(title);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void JSGlobalObjectConsoleClient::timeLog(ExecState*, const String& title, Ref<ScriptArguments>&& arguments)
+{
+    m_consoleAgent->logTiming(title, WTFMove(arguments));
+}
+
</ins><span class="cx"> void JSGlobalObjectConsoleClient::timeEnd(ExecState* exec, const String& title)
</span><span class="cx"> {
</span><span class="cx">     m_consoleAgent->stopTiming(title, createScriptCallStackForConsole(exec, 1));
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorJSGlobalObjectConsoleClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.h (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.h      2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.h 2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx">     void profileEnd(JSC::ExecState*, const String& title) override;
</span><span class="cx">     void takeHeapSnapshot(JSC::ExecState*, const String& title) override;
</span><span class="cx">     void time(JSC::ExecState*, const String& title) override;
</span><ins>+    void timeLog(JSC::ExecState*, const String& title, Ref<ScriptArguments>&& arguments) override;
</ins><span class="cx">     void timeEnd(JSC::ExecState*, const String& title) override;
</span><span class="cx">     void timeStamp(JSC::ExecState*, Ref<ScriptArguments>&&) override;
</span><span class="cx">     void record(JSC::ExecState*, Ref<ScriptArguments>&&) override;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorConsoleAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp   2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp      2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -144,6 +144,29 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void InspectorConsoleAgent::logTiming(const String& title, Ref<ScriptArguments>&& arguments)
+{
+    if (!m_injectedScriptManager.inspectorEnvironment().developerExtrasEnabled())
+        return;
+
+    ASSERT(!title.isNull());
+    if (title.isNull())
+        return;
+
+    auto it = m_times.find(title);
+    if (it == m_times.end()) {
+        // FIXME: Send an enum to the frontend for localization?
+        String warning = makeString("Timer \"", title, "\" does not exist");
+        addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::ConsoleAPI, MessageType::Timing, MessageLevel::Warning, warning));
+        return;
+    }
+
+    MonotonicTime startTime = it->value;
+    Seconds elapsed = MonotonicTime::now() - startTime;
+    String message = makeString(title, ": ", FormattedNumber::fixedWidth(elapsed.milliseconds(), 3), "ms");
+    addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::ConsoleAPI, MessageType::Timing, MessageLevel::Debug, message, WTFMove(arguments)));
+}
+
</ins><span class="cx"> void InspectorConsoleAgent::stopTiming(const String& title, Ref<ScriptCallStack>&& callStack)
</span><span class="cx"> {
</span><span class="cx">     if (!m_injectedScriptManager.inspectorEnvironment().developerExtrasEnabled())
</span><span class="lines">@@ -162,11 +185,11 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     MonotonicTime startTime = it->value;
</span><del>-    m_times.remove(it);
-
</del><span class="cx">     Seconds elapsed = MonotonicTime::now() - startTime;
</span><span class="cx">     String message = makeString(title, ": ", FormattedNumber::fixedWidth(elapsed.milliseconds(), 3), "ms");
</span><span class="cx">     addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::ConsoleAPI, MessageType::Timing, MessageLevel::Debug, message, WTFMove(callStack)));
</span><ins>+
+    m_times.remove(it);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorConsoleAgent::takeHeapSnapshot(const String& title)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorConsoleAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h     2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h        2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -71,6 +71,7 @@
</span><span class="cx">     void addMessageToConsole(std::unique_ptr<ConsoleMessage>);
</span><span class="cx"> 
</span><span class="cx">     void startTiming(const String& title);
</span><ins>+    void logTiming(const String& title, Ref<ScriptArguments>&&);
</ins><span class="cx">     void stopTiming(const String& title, Ref<ScriptCallStack>&&);
</span><span class="cx">     void takeHeapSnapshot(const String& title);
</span><span class="cx">     void count(JSC::ExecState*, Ref<ScriptArguments>&&);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeConsoleClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ConsoleClient.h (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ConsoleClient.h      2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/JavaScriptCore/runtime/ConsoleClient.h 2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx">     virtual void profileEnd(ExecState*, const String& title) = 0;
</span><span class="cx">     virtual void takeHeapSnapshot(ExecState*, const String& title) = 0;
</span><span class="cx">     virtual void time(ExecState*, const String& title) = 0;
</span><ins>+    virtual void timeLog(ExecState*, const String& title, Ref<Inspector::ScriptArguments>&&) = 0;
</ins><span class="cx">     virtual void timeEnd(ExecState*, const String& title) = 0;
</span><span class="cx">     virtual void timeStamp(ExecState*, Ref<Inspector::ScriptArguments>&&) = 0;
</span><span class="cx">     virtual void record(ExecState*, Ref<Inspector::ScriptArguments>&&) = 0;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeConsoleObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ConsoleObject.cpp (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ConsoleObject.cpp    2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/JavaScriptCore/runtime/ConsoleObject.cpp       2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL consoleProtoFuncProfileEnd(ExecState*);
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTakeHeapSnapshot(ExecState*);
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTime(ExecState*);
</span><ins>+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeLog(ExecState*);
</ins><span class="cx"> static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeEnd(ExecState*);
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeStamp(ExecState*);
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL consoleProtoFuncGroup(ExecState*);
</span><span class="lines">@@ -92,6 +93,7 @@
</span><span class="cx">     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("profile", consoleProtoFuncProfile, static_cast<unsigned>(PropertyAttribute::None), 0);
</span><span class="cx">     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("profileEnd", consoleProtoFuncProfileEnd, static_cast<unsigned>(PropertyAttribute::None), 0);
</span><span class="cx">     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("time", consoleProtoFuncTime, static_cast<unsigned>(PropertyAttribute::None), 0);
</span><ins>+    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("timeLog", consoleProtoFuncTimeLog, static_cast<unsigned>(PropertyAttribute::None), 0);
</ins><span class="cx">     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("timeEnd", consoleProtoFuncTimeEnd, static_cast<unsigned>(PropertyAttribute::None), 0);
</span><span class="cx">     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("timeStamp", consoleProtoFuncTimeStamp, static_cast<unsigned>(PropertyAttribute::None), 0);
</span><span class="cx">     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("takeHeapSnapshot", consoleProtoFuncTakeHeapSnapshot, static_cast<unsigned>(PropertyAttribute::None), 0);
</span><span class="lines">@@ -313,6 +315,26 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeLog(ExecState* exec)
+{
+    VM& vm = exec->vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+    ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+    if (!client)
+        return JSValue::encode(jsUndefined());
+
+    String title;
+    if (exec->argumentCount() < 1)
+        title =  "default"_s;
+    else {
+        title = valueOrDefaultLabelString(exec, exec->argument(0));
+        RETURN_IF_EXCEPTION(scope, encodedJSValue());
+    }
+
+    client->timeLog(exec, title, Inspector::createScriptArguments(exec, 1));
+    return JSValue::encode(jsUndefined());
+}
+
</ins><span class="cx"> static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeEnd(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     VM& vm = exec->vm();
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/WebCore/ChangeLog      2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2019-06-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Implement console.timeLog
+        https://bugs.webkit.org/show_bug.cgi?id=199184
+
+        Reviewed by Devin Rousso.
+
+        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:
+
</ins><span class="cx"> 2019-06-25  Michael Catanzaro  <mcatanzaro@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         Add user agent quirk for bankofamerica.com
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorInstrumentationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp      2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -886,6 +886,15 @@
</span><span class="cx">         consoleAgent->startTiming(title);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void InspectorInstrumentation::logConsoleTimingImpl(InstrumentingAgents& instrumentingAgents, const String& title, Ref<Inspector::ScriptArguments>&& arguments)
+{
+    if (!instrumentingAgents.inspectorEnvironment().developerExtrasEnabled())
+        return;
+
+    if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
+        consoleAgent->logTiming(title, WTFMove(arguments));
+}
+
</ins><span class="cx"> void InspectorInstrumentation::stopConsoleTimingImpl(InstrumentingAgents& instrumentingAgents, Frame& frame, const String& title, Ref<ScriptCallStack>&& stack)
</span><span class="cx"> {
</span><span class="cx">     if (!instrumentingAgents.inspectorEnvironment().developerExtrasEnabled())
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorInstrumentationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h        2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h   2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -226,6 +226,8 @@
</span><span class="cx">     static void takeHeapSnapshot(Frame&, const String& title);
</span><span class="cx">     static void startConsoleTiming(Frame&, const String& title);
</span><span class="cx">     static void startConsoleTiming(WorkerGlobalScope&, const String& title);
</span><ins>+    static void logConsoleTiming(Frame&, const String& title, Ref<Inspector::ScriptArguments>&&);
+    static void logConsoleTiming(WorkerGlobalScope&, const String& title, Ref<Inspector::ScriptArguments>&&);
</ins><span class="cx">     static void stopConsoleTiming(Frame&, const String& title, Ref<Inspector::ScriptCallStack>&&);
</span><span class="cx">     static void stopConsoleTiming(WorkerGlobalScope&, const String& title, Ref<Inspector::ScriptCallStack>&&);
</span><span class="cx">     static void consoleTimeStamp(Frame&, Ref<Inspector::ScriptArguments>&&);
</span><span class="lines">@@ -404,6 +406,7 @@
</span><span class="cx">     static void takeHeapSnapshotImpl(InstrumentingAgents&, const String& title);
</span><span class="cx">     static void startConsoleTimingImpl(InstrumentingAgents&, Frame&, const String& title);
</span><span class="cx">     static void startConsoleTimingImpl(InstrumentingAgents&, const String& title);
</span><ins>+    static void logConsoleTimingImpl(InstrumentingAgents&, const String& title, Ref<Inspector::ScriptArguments>&&);
</ins><span class="cx">     static void stopConsoleTimingImpl(InstrumentingAgents&, Frame&, const String& title, Ref<Inspector::ScriptCallStack>&&);
</span><span class="cx">     static void stopConsoleTimingImpl(InstrumentingAgents&, const String& title, Ref<Inspector::ScriptCallStack>&&);
</span><span class="cx">     static void consoleTimeStampImpl(InstrumentingAgents&, Frame&, Ref<Inspector::ScriptArguments>&&);
</span><span class="lines">@@ -1408,6 +1411,17 @@
</span><span class="cx">     startConsoleTimingImpl(instrumentingAgentsForWorkerGlobalScope(workerGlobalScope), title);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline void InspectorInstrumentation::logConsoleTiming(Frame& frame, const String& title, Ref<Inspector::ScriptArguments>&& arguments)
+{
+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
+        logConsoleTimingImpl(*instrumentingAgents, title, WTFMove(arguments));
+}
+
+inline void InspectorInstrumentation::logConsoleTiming(WorkerGlobalScope& workerGlobalScope, const String& title, Ref<Inspector::ScriptArguments>&& arguments)
+{
+    logConsoleTimingImpl(instrumentingAgentsForWorkerGlobalScope(workerGlobalScope), title, WTFMove(arguments));
+}
+
</ins><span class="cx"> inline void InspectorInstrumentation::stopConsoleTiming(Frame& frame, const String& title, Ref<Inspector::ScriptCallStack>&& stack)
</span><span class="cx"> {
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageConsoleClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageConsoleClient.cpp (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageConsoleClient.cpp  2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/WebCore/page/PageConsoleClient.cpp     2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -197,6 +197,11 @@
</span><span class="cx">     InspectorInstrumentation::startConsoleTiming(m_page.mainFrame(), title);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void PageConsoleClient::timeLog(JSC::ExecState*, const String& title, Ref<ScriptArguments>&& arguments)
+{
+    InspectorInstrumentation::logConsoleTiming(m_page.mainFrame(), title, WTFMove(arguments));
+}
+
</ins><span class="cx"> void PageConsoleClient::timeEnd(JSC::ExecState* exec, const String& title)
</span><span class="cx"> {
</span><span class="cx">     InspectorInstrumentation::stopConsoleTiming(m_page.mainFrame(), title, createScriptCallStackForConsole(exec, 1));
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageConsoleClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageConsoleClient.h (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageConsoleClient.h    2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/WebCore/page/PageConsoleClient.h       2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -72,6 +72,7 @@
</span><span class="cx">     void profileEnd(JSC::ExecState*, const String& title) override;
</span><span class="cx">     void takeHeapSnapshot(JSC::ExecState*, const String& title) override;
</span><span class="cx">     void time(JSC::ExecState*, const String& title) override;
</span><ins>+    void timeLog(JSC::ExecState*, const String& title, Ref<Inspector::ScriptArguments>&&) override;
</ins><span class="cx">     void timeEnd(JSC::ExecState*, const String& title) override;
</span><span class="cx">     void timeStamp(JSC::ExecState*, Ref<Inspector::ScriptArguments>&&) override;
</span><span class="cx">     void record(JSC::ExecState*, Ref<Inspector::ScriptArguments>&&) override;
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerConsoleClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerConsoleClient.cpp (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerConsoleClient.cpp     2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/WebCore/workers/WorkerConsoleClient.cpp        2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -60,6 +60,11 @@
</span><span class="cx">     InspectorInstrumentation::startConsoleTiming(m_workerGlobalScope, title);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WorkerConsoleClient::timeLog(JSC::ExecState*, const String& title, Ref<ScriptArguments>&& arguments)
+{
+    InspectorInstrumentation::logConsoleTiming(m_workerGlobalScope, title, WTFMove(arguments));
+}
+
</ins><span class="cx"> void WorkerConsoleClient::timeEnd(JSC::ExecState* exec, const String& title)
</span><span class="cx"> {
</span><span class="cx">     InspectorInstrumentation::stopConsoleTiming(m_workerGlobalScope, title, createScriptCallStackForConsole(exec, 1));
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerConsoleClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerConsoleClient.h (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerConsoleClient.h       2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/WebCore/workers/WorkerConsoleClient.h  2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx">     void profileEnd(JSC::ExecState*, const String& title) override;
</span><span class="cx">     void takeHeapSnapshot(JSC::ExecState*, const String& title) override;
</span><span class="cx">     void time(JSC::ExecState*, const String& title) override;
</span><ins>+    void timeLog(JSC::ExecState*, const String& title, Ref<Inspector::ScriptArguments>&&) override;
</ins><span class="cx">     void timeEnd(JSC::ExecState*, const String& title) override;
</span><span class="cx">     void timeStamp(JSC::ExecState*, Ref<Inspector::ScriptArguments>&&) override;
</span><span class="cx">     void record(JSC::ExecState*, Ref<Inspector::ScriptArguments>&&) override;
</span></span></pre></div>
<a id="trunkSourceWebCoreworkletsWorkletConsoleClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/worklets/WorkletConsoleClient.cpp (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/worklets/WorkletConsoleClient.cpp   2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/WebCore/worklets/WorkletConsoleClient.cpp      2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -55,6 +55,7 @@
</span><span class="cx"> void WorkletConsoleClient::count(JSC::ExecState*, Ref<ScriptArguments>&&) { }
</span><span class="cx"> 
</span><span class="cx"> void WorkletConsoleClient::time(JSC::ExecState*, const String&) { }
</span><ins>+void WorkletConsoleClient::timeLog(JSC::ExecState*, const String&, Ref<ScriptArguments>&&) { }
</ins><span class="cx"> void WorkletConsoleClient::timeEnd(JSC::ExecState*, const String&) { }
</span><span class="cx"> 
</span><span class="cx"> void WorkletConsoleClient::profile(JSC::ExecState*, const String&) { }
</span></span></pre></div>
<a id="trunkSourceWebCoreworkletsWorkletConsoleClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/worklets/WorkletConsoleClient.h (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/worklets/WorkletConsoleClient.h     2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/WebCore/worklets/WorkletConsoleClient.h        2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx">     void profileEnd(JSC::ExecState*, const String& title) final;
</span><span class="cx">     void takeHeapSnapshot(JSC::ExecState*, const String& title) final;
</span><span class="cx">     void time(JSC::ExecState*, const String& title) final;
</span><ins>+    void timeLog(JSC::ExecState*, const String& title, Ref<Inspector::ScriptArguments>&&) final;
</ins><span class="cx">     void timeEnd(JSC::ExecState*, const String& title) final;
</span><span class="cx">     void timeStamp(JSC::ExecState*, Ref<Inspector::ScriptArguments>&&) final;
</span><span class="cx">     void record(JSC::ExecState*, Ref<Inspector::ScriptArguments>&&) final;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog    2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/WebInspectorUI/ChangeLog       2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2019-06-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Implement console.timeLog
+        https://bugs.webkit.org/show_bug.cgi?id=199184
+
+        Reviewed by Devin Rousso.
+
+        * 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.
+
</ins><span class="cx"> 2019-06-23  Matt Baker  <mattbaker@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: REGRESSION (r246684): Dark Mode: dashboard buttons should have no background
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsConsoleMessageViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js (246797 => 246798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js    2019-06-25 18:09:32 UTC (rev 246797)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js       2019-06-25 18:36:29 UTC (rev 246798)
</span><span class="lines">@@ -288,6 +288,14 @@
</span><span class="cx">                 this._extraParameters = null;
</span><span class="cx">                 break;
</span><span class="cx"> 
</span><ins>+            case WI.ConsoleMessage.MessageType.Timing: {
+                let args = [this._message.messageText];
+                if (this._extraParameters)
+                    args = args.concat(this._extraParameters);
+                this._appendFormattedArguments(element, args);
+                break;
+            }
+
</ins><span class="cx">             case WI.ConsoleMessage.MessageType.Image: {
</span><span class="cx">                 let img = element.appendChild(document.createElement("img"));
</span><span class="cx">                 img.classList.add("console-image", "show-grid");
</span></span></pre>
</div>
</div>

</body>
</html>