<!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>[184045] trunk/Source/WebInspectorUI</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/184045">184045</a></dd>
<dt>Author</dt> <dd>nvasilyev@apple.com</dd>
<dt>Date</dt> <dd>2015-05-10 05:23:07 -0700 (Sun, 10 May 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: In the console, show function name next to the source link
https://bugs.webkit.org/show_bug.cgi?id=144372

Introduce CallFrameView to display counsole message source links. It looks like this:

    [f] functionName - filename.js:42

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js:
(WebInspector.createSourceCodeLocationLink):
(WebInspector.linkifyLocation):
(.showSourceCodeLocation):
(WebInspector.linkifyElement):
Abstract this out as it's used in WebInspector.CallFrameView and WebInspector.createSourceCodeLocationLink.

(WebInspector.sourceCodeForURL):
Move this code from Timeline to Main.js as it's used by Console too.

(WebInspector.linkifyURLAsNode):
Remove tooltipText argument as it is never used.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._callFramesFromPayload):
* UserInterface/Main.html:
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.fromPayload):
Abstract this out as it's used in WebInspector.TimelineManager.prototype._callFramesFromPayload and
WebInspector.ConsoleMessageView._appendLocationLink.

(WebInspector.CallFrame):
* UserInterface/Views/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
Move it to WebInspector.CallFrameView.iconForCallFrame.

* UserInterface/Views/CallFrameView.css: Added.
(.call-frame):
(.call-frame .icon):
(.call-frame .titles):
(.call-frame .title):
(.call-frame .source-link):
(.call-frame .title + .subtitle &gt; .source-link):
(.call-frame .subtitle .source-link):
(.call-frame:focus .subtitle .source-link):
(.call-frame .subtitle:empty):
(.call-frame .subtitle):
(.call-frame .colon):
(.call-frame .title + .subtitle::before):
* UserInterface/Views/CallFrameView.js: Added.
(WebInspector.CallFrameView):
(WebInspector.CallFrameView.iconClassNameForCallFrame):
* UserInterface/Views/ConsoleMessageView.css:
(.console-message .console-message-location):
(.console-message .call-frame):
(.console-message .go-to-link):
(.console-message .go-to-link:focus):
(.console-message .console-message-url::before):
(.console-saved-variable): Deleted.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendLocationLink):
* UserInterface/Views/DebuggerDashboardView.js:
* UserInterface/Views/Main.css:
(.hidden): Deleted.
* UserInterface/Views/ProfileNodeTreeElement.js:
(WebInspector.ProfileNodeTreeElement):
* UserInterface/Views/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.createCellContent):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceBaseMainjs">trunk/Source/WebInspectorUI/UserInterface/Base/Main.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersTimelineManagerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceMainhtml">trunk/Source/WebInspectorUI/UserInterface/Main.html</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsCallFramejs">trunk/Source/WebInspectorUI/UserInterface/Models/CallFrame.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsCallFrameTreeElementjs">trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameTreeElement.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsConsoleMessageViewcss">trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsConsoleMessageViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDebuggerDashboardViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsMaincss">trunk/Source/WebInspectorUI/UserInterface/Views/Main.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsProfileNodeTreeElementjs">trunk/Source/WebInspectorUI/UserInterface/Views/ProfileNodeTreeElement.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineDataGridNodejs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsCallFrameViewcss">trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameView.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsCallFrameViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameView.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (184044 => 184045)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-05-10 06:46:33 UTC (rev 184044)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-05-10 12:23:07 UTC (rev 184045)
</span><span class="lines">@@ -1,3 +1,73 @@
</span><ins>+2015-05-10  Nikita Vasilyev  &lt;nvasilyev@apple.com&gt;
+
+        Web Inspector: In the console, show function name next to the source link
+        https://bugs.webkit.org/show_bug.cgi?id=144372
+
+        Introduce CallFrameView to display counsole message source links. It looks like this:
+
+            [f] functionName - filename.js:42
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Base/Main.js:
+        (WebInspector.createSourceCodeLocationLink):
+        (WebInspector.linkifyLocation):
+        (.showSourceCodeLocation):
+        (WebInspector.linkifyElement):
+        Abstract this out as it's used in WebInspector.CallFrameView and WebInspector.createSourceCodeLocationLink.
+
+        (WebInspector.sourceCodeForURL):
+        Move this code from Timeline to Main.js as it's used by Console too.
+
+        (WebInspector.linkifyURLAsNode):
+        Remove tooltipText argument as it is never used.
+
+        * UserInterface/Controllers/TimelineManager.js:
+        (WebInspector.TimelineManager.prototype._callFramesFromPayload):
+        * UserInterface/Main.html:
+        * UserInterface/Models/CallFrame.js:
+        (WebInspector.CallFrame.fromPayload):
+        Abstract this out as it's used in WebInspector.TimelineManager.prototype._callFramesFromPayload and
+        WebInspector.ConsoleMessageView._appendLocationLink.
+
+        (WebInspector.CallFrame):
+        * UserInterface/Views/CallFrameTreeElement.js:
+        (WebInspector.CallFrameTreeElement):
+        Move it to WebInspector.CallFrameView.iconForCallFrame.
+
+        * UserInterface/Views/CallFrameView.css: Added.
+        (.call-frame):
+        (.call-frame .icon):
+        (.call-frame .titles):
+        (.call-frame .title):
+        (.call-frame .source-link):
+        (.call-frame .title + .subtitle &gt; .source-link):
+        (.call-frame .subtitle .source-link):
+        (.call-frame:focus .subtitle .source-link):
+        (.call-frame .subtitle:empty):
+        (.call-frame .subtitle):
+        (.call-frame .colon):
+        (.call-frame .title + .subtitle::before):
+        * UserInterface/Views/CallFrameView.js: Added.
+        (WebInspector.CallFrameView):
+        (WebInspector.CallFrameView.iconClassNameForCallFrame):
+        * UserInterface/Views/ConsoleMessageView.css:
+        (.console-message .console-message-location):
+        (.console-message .call-frame):
+        (.console-message .go-to-link):
+        (.console-message .go-to-link:focus):
+        (.console-message .console-message-url::before):
+        (.console-saved-variable): Deleted.
+        * UserInterface/Views/ConsoleMessageView.js:
+        (WebInspector.ConsoleMessageView.prototype._appendLocationLink):
+        * UserInterface/Views/DebuggerDashboardView.js:
+        * UserInterface/Views/Main.css:
+        (.hidden): Deleted.
+        * UserInterface/Views/ProfileNodeTreeElement.js:
+        (WebInspector.ProfileNodeTreeElement):
+        * UserInterface/Views/TimelineDataGridNode.js:
+        (WebInspector.TimelineDataGridNode.prototype.createCellContent):
+
</ins><span class="cx"> 2015-05-08  Tobias Reiss  &lt;tobi+webkit@basecode.de&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Styles sidebar editing with incomplete property looks poor in UI
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseMainjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (184044 => 184045)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-05-10 06:46:33 UTC (rev 184044)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-05-10 12:23:07 UTC (rev 184045)
</span><span class="lines">@@ -1739,20 +1739,9 @@
</span><span class="cx">     if (!sourceCodeLocation)
</span><span class="cx">         return null;
</span><span class="cx"> 
</span><del>-    function showSourceCodeLocation(event)
-    {
-        event.stopPropagation();
-        event.preventDefault();
-
-        if (event.metaKey)
-            this.showOriginalUnformattedSourceCodeLocation(sourceCodeLocation);
-        else
-            this.showSourceCodeLocation(sourceCodeLocation);
-    }
-
</del><span class="cx">     var linkElement = document.createElement(&quot;a&quot;);
</span><span class="cx">     linkElement.className = &quot;go-to-link&quot;;
</span><del>-    linkElement.addEventListener(&quot;click&quot;, showSourceCodeLocation.bind(this));
</del><ins>+    WebInspector.linkifyElement(linkElement, sourceCodeLocation);
</ins><span class="cx">     sourceCodeLocation.populateLiveDisplayLocationTooltip(linkElement);
</span><span class="cx"> 
</span><span class="cx">     if (useGoToArrowButton)
</span><span class="lines">@@ -1768,12 +1757,7 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector.linkifyLocation = function(url, lineNumber, columnNumber, className)
</span><span class="cx"> {
</span><del>-    var sourceCode = WebInspector.frameResourceManager.resourceForURL(url);
-    if (!sourceCode) {
-        sourceCode = WebInspector.debuggerManager.scriptsForURL(url)[0];
-        if (sourceCode)
-            sourceCode = sourceCode.resource || sourceCode;
-    }
</del><ins>+    var sourceCode = WebInspector.sourceCodeForURL(url);
</ins><span class="cx"> 
</span><span class="cx">     if (!sourceCode) {
</span><span class="cx">         var anchor = document.createElement(&quot;a&quot;);
</span><span class="lines">@@ -1792,7 +1776,34 @@
</span><span class="cx">     return linkElement;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-WebInspector.linkifyURLAsNode = function(url, linkText, classes, tooltipText)
</del><ins>+WebInspector.linkifyElement = function(linkElement, sourceCodeLocation) {
+    console.assert(sourceCodeLocation);
+
+    function showSourceCodeLocation(event)
+    {
+        event.stopPropagation();
+        event.preventDefault();
+
+        if (event.metaKey)
+            this.showOriginalUnformattedSourceCodeLocation(sourceCodeLocation);
+        else
+            this.showSourceCodeLocation(sourceCodeLocation);
+    }
+
+    linkElement.addEventListener(&quot;click&quot;, showSourceCodeLocation.bind(this));
+};
+
+WebInspector.sourceCodeForURL = function(url) {
+    var sourceCode = WebInspector.frameResourceManager.resourceForURL(url);
+    if (!sourceCode) {
+        sourceCode = WebInspector.debuggerManager.scriptsForURL(url)[0];
+        if (sourceCode)
+            sourceCode = sourceCode.resource || sourceCode;
+    }
+    return sourceCode || null;
+};
+
+WebInspector.linkifyURLAsNode = function(url, linkText, classes)
</ins><span class="cx"> {
</span><span class="cx">     if (!linkText)
</span><span class="cx">         linkText = url;
</span><span class="lines">@@ -1803,11 +1814,6 @@
</span><span class="cx">     a.href = url;
</span><span class="cx">     a.className = classes;
</span><span class="cx"> 
</span><del>-    if (tooltipText === undefined)
-        a.title = url;
-    else if (typeof tooltipText !== &quot;string&quot; || tooltipText.length)
-        a.title = tooltipText;
-
</del><span class="cx">     a.textContent = linkText;
</span><span class="cx">     a.style.maxWidth = &quot;100%&quot;;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersTimelineManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (184044 => 184045)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js        2015-05-10 06:46:33 UTC (rev 184044)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js        2015-05-10 12:23:07 UTC (rev 184045)
</span><span class="lines">@@ -451,30 +451,7 @@
</span><span class="cx">         if (!payload)
</span><span class="cx">             return null;
</span><span class="cx"> 
</span><del>-        function createCallFrame(payload)
-        {
-            var url = payload.url;
-            var nativeCode = false;
-
-            if (url === &quot;[native code]&quot;) {
-                nativeCode = true;
-                url = null;
-            }
-
-            var sourceCode = WebInspector.frameResourceManager.resourceForURL(url);
-            if (!sourceCode)
-                sourceCode = WebInspector.debuggerManager.scriptsForURL(url)[0];
-
-            // The lineNumber is 1-based, but we expect 0-based.
-            var lineNumber = payload.lineNumber - 1;
-
-            var sourceCodeLocation = sourceCode ? sourceCode.createLazySourceCodeLocation(lineNumber, payload.columnNumber) : null;
-            var functionName = payload.functionName !== &quot;global code&quot; ? payload.functionName : null;
-
-            return new WebInspector.CallFrame(null, sourceCodeLocation, functionName, null, null, nativeCode);
-        }
-
-        return payload.map(createCallFrame);
</del><ins>+        return payload.map(WebInspector.CallFrame.fromPayload);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _addRecord(record)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceMainhtml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (184044 => 184045)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Main.html        2015-05-10 06:46:33 UTC (rev 184044)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html        2015-05-10 12:23:07 UTC (rev 184045)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/CSSStyleDeclarationTextEditor.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/CSSStyleDetailsSidebarPanel.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/CallFrameIcons.css&quot;&gt;
</span><ins>+    &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/CallFrameView.css&quot;&gt;
</ins><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/ChartDetailsSectionRow.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/ClusterContentView.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/CodeMirrorOverrides.css&quot;&gt;
</span><span class="lines">@@ -377,6 +378,7 @@
</span><span class="cx">     &lt;script src=&quot;Views/CSSStyleDeclarationTextEditor.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/CSSStyleDetailsSidebarPanel.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/CallFrameTreeElement.js&quot;&gt;&lt;/script&gt;
</span><ins>+    &lt;script src=&quot;Views/CallFrameView.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script src=&quot;Views/ChartDetailsSectionRow.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/ClusterContentView.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/CodeMirrorAdditions.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsCallFramejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CallFrame.js (184044 => 184045)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/CallFrame.js        2015-05-10 06:46:33 UTC (rev 184044)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CallFrame.js        2015-05-10 12:23:07 UTC (rev 184045)
</span><span class="lines">@@ -99,4 +99,31 @@
</span><span class="cx">         for (var i = 0; i &lt; this._scopeChain.length; ++i)
</span><span class="cx">             this._scopeChain[i].object.deprecatedGetAllProperties(propertiesCollected);
</span><span class="cx">     }
</span><ins>+
+    // Static
+
+    static fromPayload(payload)
+    {
+        console.assert(payload);
+
+        var url = payload.url;
+        var nativeCode = false;
+
+        if (url === &quot;[native code]&quot;) {
+            nativeCode = true;
+            url = null;
+        }
+
+        var sourceCode = WebInspector.frameResourceManager.resourceForURL(url);
+        if (!sourceCode)
+            sourceCode = WebInspector.debuggerManager.scriptsForURL(url)[0];
+
+        // The lineNumber is 1-based, but we expect 0-based.
+        var lineNumber = payload.lineNumber - 1;
+
+        var sourceCodeLocation = sourceCode ? sourceCode.createLazySourceCodeLocation(lineNumber, payload.columnNumber) : null;
+        var functionName = payload.functionName !== &quot;global code&quot; ? payload.functionName : null;
+
+        return new WebInspector.CallFrame(null, sourceCodeLocation, functionName, null, null, nativeCode);
+    }
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsCallFrameTreeElementjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameTreeElement.js (184044 => 184045)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameTreeElement.js        2015-05-10 06:46:33 UTC (rev 184044)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameTreeElement.js        2015-05-10 12:23:07 UTC (rev 184045)
</span><span class="lines">@@ -29,15 +29,7 @@
</span><span class="cx">     {
</span><span class="cx">         console.assert(callFrame instanceof WebInspector.CallFrame);
</span><span class="cx"> 
</span><del>-        var className = WebInspector.CallFrameTreeElement.FunctionIconStyleClassName;
-        if (callFrame.nativeCode)
-            className = WebInspector.CallFrameTreeElement.NativeIconStyleClassName;
-
-        // This is more than likely an event listener function with an &quot;on&quot; prefix and it is
-        // as long or longer than the shortest event listener name -- &quot;oncut&quot;.
-        if (callFrame.functionName &amp;&amp; callFrame.functionName.startsWith(&quot;on&quot;) &amp;&amp; callFrame.functionName.length &gt;= 5)
-            className = WebInspector.CallFrameTreeElement.EventListenerIconStyleClassName;
-
</del><ins>+        var className = WebInspector.CallFrameView.iconClassNameForCallFrame(callFrame);
</ins><span class="cx">         var title = callFrame.functionName || WebInspector.UIString(&quot;(anonymous function)&quot;);
</span><span class="cx"> 
</span><span class="cx">         super(className, title, null, callFrame, false);
</span><span class="lines">@@ -78,7 +70,3 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> };
</span><del>-
-WebInspector.CallFrameTreeElement.FunctionIconStyleClassName = &quot;function-icon&quot;;
-WebInspector.CallFrameTreeElement.EventListenerIconStyleClassName = &quot;event-listener-icon&quot;;
-WebInspector.CallFrameTreeElement.NativeIconStyleClassName = &quot;native-icon&quot;;
</del></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsCallFrameViewcss"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameView.css (0 => 184045)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameView.css                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameView.css        2015-05-10 12:23:07 UTC (rev 184045)
</span><span class="lines">@@ -0,0 +1,87 @@
</span><ins>+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.call-frame {
+    white-space: nowrap;
+    cursor: pointer;
+}
+
+.call-frame .icon {
+    display: inline-block;
+    vertical-align: top;
+    width: 16px;
+    height: 16px;
+    margin-right: 3px;
+}
+
+.call-frame .titles {
+    display: inline-block;
+}
+
+.call-frame .title {
+    max-width: 20vw;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: inline-block;
+}
+
+.call-frame .source-link {
+    max-width: 50vw;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: inline-block;
+}
+
+.call-frame .title + .subtitle &gt; .source-link {
+    max-width: 30vw;
+}
+
+.call-frame .subtitle,
+.call-frame .subtitle .source-link {
+    color: hsla(0, 0%, 0%, 0.6);
+    text-decoration: none;
+}
+
+.call-frame:hover .subtitle .source-link,
+.call-frame:focus .subtitle .source-link {
+    color: hsl(210, 0%, 0%);
+}
+
+.call-frame .subtitle:empty {
+    display: none;
+}
+
+.call-frame .subtitle {
+    font-size: inherit;
+}
+
+.call-frame .colon {
+    background-color: red;
+}
+
+.call-frame .title + .subtitle::before {
+    content: &quot; — &quot;;
+    color: hsla(0, 0%, 0%, 0.4);
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsCallFrameViewjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameView.js (0 => 184045)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameView.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameView.js        2015-05-10 12:23:07 UTC (rev 184045)
</span><span class="lines">@@ -0,0 +1,85 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.CallFrameView = class CallFrameView extends WebInspector.Object
+{
+    constructor(callFrame)
+    {
+        console.assert(callFrame.sourceCodeLocation &amp;&amp; callFrame.sourceCodeLocation.sourceCode);
+
+        var callFrameElement = document.createElement(&quot;div&quot;);
+        callFrameElement.classList.add(&quot;call-frame&quot;, WebInspector.CallFrameView.iconClassNameForCallFrame(callFrame));
+
+        var sourceCodeLocation = callFrame.sourceCodeLocation;
+        WebInspector.linkifyElement(callFrameElement, sourceCodeLocation);
+
+        var linkElement = document.createElement(&quot;a&quot;);
+        linkElement.className = &quot;source-link&quot;;
+        linkElement.href = sourceCodeLocation.sourceCode.url;
+        sourceCodeLocation.populateLiveDisplayLocationTooltip(linkElement);
+        sourceCodeLocation.populateLiveDisplayLocationString(linkElement, &quot;textContent&quot;);
+
+        var subtitleElement = document.createElement(&quot;span&quot;);
+        subtitleElement.classList.add(&quot;subtitle&quot;);
+        subtitleElement.appendChild(linkElement);
+
+        if (callFrame.functionName) {
+            var imgElement = document.createElement(&quot;img&quot;);
+            imgElement.className = &quot;icon&quot;;
+            callFrameElement.appendChild(imgElement);
+
+            var titlesElement = document.createElement(&quot;div&quot;);
+            titlesElement.className = &quot;titles&quot;;
+            callFrameElement.appendChild(titlesElement);
+
+            var titleElement = document.createElement(&quot;span&quot;);
+            titleElement.className = &quot;title&quot;;
+            titleElement.textContent = callFrame.functionName;
+            titlesElement.appendChild(titleElement);
+
+            titlesElement.appendChild(subtitleElement);
+        } else
+            callFrameElement.appendChild(subtitleElement);
+
+        return callFrameElement;
+    }
+
+    static iconClassNameForCallFrame(callFrame)
+    {
+        // This is more than likely an event listener function with an &quot;on&quot; prefix and it is
+        // as long or longer than the shortest event listener name -- &quot;oncut&quot;.
+        if (callFrame.functionName &amp;&amp; callFrame.functionName.startsWith(&quot;on&quot;) &amp;&amp; callFrame.functionName.length &gt;= 5)
+            return WebInspector.CallFrameView.EventListenerIconStyleClassName;
+
+        if (callFrame.nativeCode)
+            return WebInspector.CallFrameView.NativeIconStyleClassName;
+
+        return WebInspector.CallFrameView.FunctionIconStyleClassName;
+    }
+};
+
+WebInspector.CallFrameView.FunctionIconStyleClassName = &quot;function-icon&quot;;
+WebInspector.CallFrameView.EventListenerIconStyleClassName = &quot;event-listener-icon&quot;;
+WebInspector.CallFrameView.NativeIconStyleClassName = &quot;native-icon&quot;;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsConsoleMessageViewcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css (184044 => 184045)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css        2015-05-10 06:46:33 UTC (rev 184044)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css        2015-05-10 12:23:07 UTC (rev 184045)
</span><span class="lines">@@ -201,12 +201,6 @@
</span><span class="cx">     color: rgb(0, 128, 255);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.console-message-url {
-    float: right;
-    margin-left: 4px;
-    font-weight: normal;
-}
-
</del><span class="cx"> .console-saved-variable {
</span><span class="cx">     font-style: normal;
</span><span class="cx">     color: rgba(0, 0, 0, 0.33);
</span><span class="lines">@@ -222,3 +216,27 @@
</span><span class="cx">     content: url(../Images/UserInputResult.svg);
</span><span class="cx">     margin-left: 1px;
</span><span class="cx"> }
</span><ins>+
+.console-message .console-message-location {
+    float: right;
+    font-weight: normal;
+}
+
+.console-message .call-frame {
+    -webkit-user-select: text;
+    height: 1.2em;
+}
+
+.console-message .go-to-link {
+    color: hsla(0, 0%, 0%, 0.6);
+    text-decoration: none;
+}
+
+.console-message .go-to-link:hover,
+.console-message .go-to-link:focus {
+    color: hsl(210, 100%, 40%);
+}
+
+.console-message .console-message-url::before {
+    content: ' ';
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsConsoleMessageViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js (184044 => 184045)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js        2015-05-10 06:46:33 UTC (rev 184044)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js        2015-05-10 12:23:07 UTC (rev 184045)
</span><span class="lines">@@ -287,13 +287,26 @@
</span><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         var firstNonNativeCallFrame = this._firstNonNativeCallFrame();
</span><ins>+
+        var callFrame;
</ins><span class="cx">         if (firstNonNativeCallFrame) {
</span><del>-            var urlElement = this._linkifyCallFrame(firstNonNativeCallFrame);
-            this._element.appendChild(urlElement);
</del><ins>+            // JavaScript errors and console.* methods.
+            callFrame = WebInspector.CallFrame.fromPayload(firstNonNativeCallFrame);
</ins><span class="cx">         } else if (this._message.url &amp;&amp; !this._shouldHideURL(this._message.url)) {
</span><del>-            var urlElement = this._linkifyLocation(this._message.url, this._message.line, this._message.column);
-            this._element.appendChild(urlElement);
</del><ins>+            // CSS warnings have no stack traces.
+            callFrame = WebInspector.CallFrame.fromPayload({
+                url: this._message.url,
+                lineNumber: this._message.line,
+                columnNumber: this._message.column
+            });
</ins><span class="cx">         }
</span><ins>+
+        if (!callFrame)
+            return;
+
+        var locationElement = new WebInspector.CallFrameView(callFrame);
+        locationElement.classList.add(&quot;console-message-location&quot;);
+        this._element.appendChild(locationElement);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _appendExtraParameters()
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDebuggerDashboardViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.js (184044 => 184045)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.js        2015-05-10 06:46:33 UTC (rev 184044)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.js        2015-05-10 12:23:07 UTC (rev 184045)
</span><span class="lines">@@ -100,8 +100,8 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-WebInspector.DebuggerDashboardView.FunctionIconStyleClassName = WebInspector.CallFrameTreeElement.FunctionIconStyleClassName;
-WebInspector.DebuggerDashboardView.EventListenerIconStyleClassName = WebInspector.CallFrameTreeElement.EventListenerIconStyleClassName;
</del><ins>+WebInspector.DebuggerDashboardView.FunctionIconStyleClassName = WebInspector.CallFrameView.FunctionIconStyleClassName;
+WebInspector.DebuggerDashboardView.EventListenerIconStyleClassName = WebInspector.CallFrameView.EventListenerIconStyleClassName;
</ins><span class="cx"> 
</span><span class="cx"> WebInspector.DebuggerDashboardView.IconStyleClassName = &quot;icon&quot;;
</span><span class="cx"> WebInspector.DebuggerDashboardView.MessageStyleClassName = &quot;message&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsMaincss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Main.css (184044 => 184045)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/Main.css        2015-05-10 06:46:33 UTC (rev 184044)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Main.css        2015-05-10 12:23:07 UTC (rev 184045)
</span><span class="lines">@@ -269,10 +269,6 @@
</span><span class="cx">     background-image: -webkit-canvas(go-to-arrow-selected-active);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.display-location {
-    font-style: italic !important;
-}
-
</del><span class="cx"> .hidden {
</span><span class="cx">     display: none !important;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsProfileNodeTreeElementjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProfileNodeTreeElement.js (184044 => 184045)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ProfileNodeTreeElement.js        2015-05-10 06:46:33 UTC (rev 184044)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProfileNodeTreeElement.js        2015-05-10 12:23:07 UTC (rev 184045)
</span><span class="lines">@@ -56,9 +56,9 @@
</span><span class="cx"> 
</span><span class="cx">         switch (profileNode.type) {
</span><span class="cx">         case WebInspector.ProfileNode.Type.Function:
</span><del>-            className = WebInspector.CallFrameTreeElement.FunctionIconStyleClassName;
</del><ins>+            className = WebInspector.CallFrameView.FunctionIconStyleClassName;
</ins><span class="cx">             if (!sourceCodeLocation)
</span><del>-                className = WebInspector.CallFrameTreeElement.NativeIconStyleClassName;
</del><ins>+                className = WebInspector.CallFrameView.NativeIconStyleClassName;
</ins><span class="cx">             break;
</span><span class="cx">         case WebInspector.ProfileNode.Type.Program:
</span><span class="cx">             className = WebInspector.TimelineRecordTreeElement.EvaluatedRecordIconStyleClass;
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">         // This is more than likely an event listener function with an &quot;on&quot; prefix and it is
</span><span class="cx">         // as long or longer than the shortest event listener name -- &quot;oncut&quot;.
</span><span class="cx">         if (profileNode.functionName &amp;&amp; profileNode.functionName.startsWith(&quot;on&quot;) &amp;&amp; profileNode.functionName.length &gt;= 5)
</span><del>-            className = WebInspector.CallFrameTreeElement.EventListenerIconStyleClassName;
</del><ins>+            className = WebInspector.CallFrameView.EventListenerIconStyleClassName;
</ins><span class="cx"> 
</span><span class="cx">         var hasChildren = !!profileNode.childNodes.length;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineDataGridNodejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js (184044 => 184045)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js        2015-05-10 06:46:33 UTC (rev 184044)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js        2015-05-10 12:23:07 UTC (rev 184045)
</span><span class="lines">@@ -150,7 +150,7 @@
</span><span class="cx">                 isAnonymousFunction = true;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            cell.classList.add(WebInspector.CallFrameTreeElement.FunctionIconStyleClassName);
</del><ins>+            cell.classList.add(WebInspector.CallFrameView.FunctionIconStyleClassName);
</ins><span class="cx"> 
</span><span class="cx">             var fragment = document.createDocumentFragment();
</span><span class="cx"> 
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx">                     fragment.appendChild(titleElement);
</span><span class="cx">                 } else {
</span><span class="cx">                     // Show the function name and icon.
</span><del>-                    cell.classList.add(WebInspector.CallFrameTreeElement.FunctionIconStyleClassName);
</del><ins>+                    cell.classList.add(WebInspector.CallFrameView.FunctionIconStyleClassName);
</ins><span class="cx"> 
</span><span class="cx">                     fragment.appendChild(document.createTextNode(functionName));
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>