<!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>[180941] 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/180941">180941</a></dd>
<dt>Author</dt> <dd>nvasilyev@apple.com</dd>
<dt>Date</dt> <dd>2015-03-03 10:10:56 -0800 (Tue, 03 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Refactoring: separate ConsoleSession from ConsoleGroup
https://bugs.webkit.org/show_bug.cgi?id=142141

ConsoleSession doesn't have a title and it's not collapsible either.
Simplify ConsoleSession by removing excessive markup.

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype.startNewSession):
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
(WebInspector.JavaScriptLogViewController.prototype.get topConsoleGroup): Deleted.
* UserInterface/Main.html:
* UserInterface/Views/ConsoleGroup.js:
(WebInspector.ConsoleGroup):
(WebInspector.ConsoleGroup.prototype.render):
(WebInspector.ConsoleGroup.prototype.addMessage):
(WebInspector.ConsoleGroup.prototype.append):
(WebInspector.ConsoleGroup.prototype.hasMessages): Deleted.
* UserInterface/Views/ConsoleSession.js: Added.
(WebInspector.ConsoleSession):
(WebInspector.ConsoleSession.prototype.addMessage):
(WebInspector.ConsoleSession.prototype.append):
(WebInspector.ConsoleSession.prototype.hasMessages):
* UserInterface/Views/LogContentView.css:
(.console-session + .console-session):
(.console-group.new-session .console-group-messages .console-item:first-child): Deleted.
(.console-group.new-session): Deleted.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersJavaScriptLogViewControllerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceMainhtml">trunk/Source/WebInspectorUI/UserInterface/Main.html</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsConsoleGroupjs">trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleGroup.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsLogContentViewcss">trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsConsoleSessionjs">trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleSession.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (180940 => 180941)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-03-03 18:05:59 UTC (rev 180940)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-03-03 18:10:56 UTC (rev 180941)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2015-03-03  Nikita Vasilyev  &lt;nvasilyev@apple.com&gt;
+
+        Web Inspector: Refactoring: separate ConsoleSession from ConsoleGroup
+        https://bugs.webkit.org/show_bug.cgi?id=142141
+
+        ConsoleSession doesn't have a title and it's not collapsible either.
+        Simplify ConsoleSession by removing excessive markup.
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Controllers/JavaScriptLogViewController.js:
+        (WebInspector.JavaScriptLogViewController):
+        (WebInspector.JavaScriptLogViewController.prototype.startNewSession):
+        (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
+        (WebInspector.JavaScriptLogViewController.prototype.get topConsoleGroup): Deleted.
+        * UserInterface/Main.html:
+        * UserInterface/Views/ConsoleGroup.js:
+        (WebInspector.ConsoleGroup):
+        (WebInspector.ConsoleGroup.prototype.render):
+        (WebInspector.ConsoleGroup.prototype.addMessage):
+        (WebInspector.ConsoleGroup.prototype.append):
+        (WebInspector.ConsoleGroup.prototype.hasMessages): Deleted.
+        * UserInterface/Views/ConsoleSession.js: Added.
+        (WebInspector.ConsoleSession):
+        (WebInspector.ConsoleSession.prototype.addMessage):
+        (WebInspector.ConsoleSession.prototype.append):
+        (WebInspector.ConsoleSession.prototype.hasMessages):
+        * UserInterface/Views/LogContentView.css:
+        (.console-session + .console-session):
+        (.console-group.new-session .console-group-messages .console-item:first-child): Deleted.
+        (.console-group.new-session): Deleted.
+
</ins><span class="cx"> 2015-03-03  Brian J. Burg  &lt;burg@cs.washington.edu&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: popover should use requestAnimationFrame to drive move/resize animations
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersJavaScriptLogViewControllerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js (180940 => 180941)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js        2015-03-03 18:05:59 UTC (rev 180940)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js        2015-03-03 18:10:56 UTC (rev 180941)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx">     this._previousMessage = null;
</span><span class="cx">     this._repeatCountWasInterrupted = false;
</span><span class="cx"> 
</span><del>-    this._topConsoleGroups = [];
</del><ins>+    this._sessions = [];
</ins><span class="cx"> 
</span><span class="cx">     this.messagesClearKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;K&quot;, this._handleClearShortcut.bind(this));
</span><span class="cx">     this.messagesAlternateClearKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Control, &quot;L&quot;, this._handleClearShortcut.bind(this), this._element);
</span><span class="lines">@@ -74,11 +74,6 @@
</span><span class="cx">         return this._prompt;
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    get topConsoleGroup()
-    {
-        return this._topConsoleGroup;
-    },
-
</del><span class="cx">     get currentConsoleGroup()
</span><span class="cx">     {
</span><span class="cx">         return this._currentConsoleGroup;
</span><span class="lines">@@ -98,36 +93,34 @@
</span><span class="cx"> 
</span><span class="cx">     startNewSession: function(clearPreviousSessions)
</span><span class="cx">     {
</span><del>-        if (this._topConsoleGroups.length &amp;&amp; clearPreviousSessions) {
-            for (var i = 0; i &lt; this._topConsoleGroups.length; ++i)
-                this._element.removeChild(this._topConsoleGroups[i].element);
</del><ins>+        if (this._sessions.length &amp;&amp; clearPreviousSessions) {
+            for (var i = 0; i &lt; this._sessions.length; ++i)
+                this._element.removeChild(this._sessions[i].element);
</ins><span class="cx"> 
</span><del>-            this._topConsoleGroups = [];
-            this._topConsoleGroup = null;
</del><ins>+            this._sessions = [];
</ins><span class="cx">             this._currentConsoleGroup = null;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        // Reuse the top group if it has no messages.
-        if (this._topConsoleGroup &amp;&amp; !this._topConsoleGroup.hasMessages()) {
</del><ins>+        var lastSession = this._sessions.lastValue;
+        // Reuse the last session if it has no messages.
+        if (lastSession &amp;&amp; !lastSession.hasMessages()) {
</ins><span class="cx">             // Make sure the session is visible.
</span><del>-            this._topConsoleGroup.element.scrollIntoView();
</del><ins>+            lastSession.element.scrollIntoView();
</ins><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        var hasPreviousSession = !!this._topConsoleGroup;
-        var consoleGroup = new WebInspector.ConsoleGroup(null, hasPreviousSession);
</del><ins>+        var consoleSession = new WebInspector.ConsoleSession();
</ins><span class="cx"> 
</span><span class="cx">         this._previousMessage = null;
</span><span class="cx">         this._repeatCountWasInterrupted = false;
</span><span class="cx"> 
</span><del>-        this._topConsoleGroups.push(consoleGroup);
-        this._topConsoleGroup = consoleGroup;
-        this._currentConsoleGroup = consoleGroup;
</del><ins>+        this._sessions.push(consoleSession);
+        this._currentConsoleGroup = consoleSession;
</ins><span class="cx"> 
</span><del>-        this._element.appendChild(consoleGroup.element);
</del><ins>+        this._element.appendChild(consoleSession.element);
</ins><span class="cx"> 
</span><span class="cx">         // Make sure the new session is visible.
</span><del>-        consoleGroup.element.scrollIntoView();
</del><ins>+        consoleSession.element.scrollIntoView();
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     appendImmediateExecutionWithResult: function(text, result)
</span><span class="lines">@@ -290,11 +283,11 @@
</span><span class="cx">         } else {
</span><span class="cx">             if (msg.type === WebInspector.ConsoleMessage.MessageType.StartGroup || msg.type === WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed) {
</span><span class="cx">                 var group = new WebInspector.ConsoleGroup(this._currentConsoleGroup);
</span><del>-                this._currentConsoleGroup.messagesElement.appendChild(group.element);
</del><ins>+                var groupElement = group.render(msg);
+                this._currentConsoleGroup.append(groupElement);
</ins><span class="cx">                 this._currentConsoleGroup = group;
</span><del>-            }
-
-            this._currentConsoleGroup.addMessage(msg);
</del><ins>+            } else
+                this._currentConsoleGroup.addMessage(msg);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (msg.type === WebInspector.ConsoleMessage.MessageType.Result || wasScrolledToBottom)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceMainhtml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (180940 => 180941)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Main.html        2015-03-03 18:05:59 UTC (rev 180940)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html        2015-03-03 18:10:56 UTC (rev 180941)
</span><span class="lines">@@ -348,6 +348,7 @@
</span><span class="cx">     &lt;script src=&quot;Views/ConsoleCommandResult.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/ConsoleGroup.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/ConsolePrompt.js&quot;&gt;&lt;/script&gt;
</span><ins>+    &lt;script src=&quot;Views/ConsoleSession.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script src=&quot;Views/ContentBrowser.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/ContentFlowDOMTreeContentView.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/ContentFlowTreeElement.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsConsoleGroupjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleGroup.js (180940 => 180941)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleGroup.js        2015-03-03 18:05:59 UTC (rev 180940)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleGroup.js        2015-03-03 18:10:56 UTC (rev 180941)
</span><span class="lines">@@ -27,24 +27,11 @@
</span><span class="cx">  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-WebInspector.ConsoleGroup = function(parentGroup, isNewSession)
</del><ins>+WebInspector.ConsoleGroup = function(parentGroup)
</ins><span class="cx"> {
</span><span class="cx">     WebInspector.Object.call(this);
</span><span class="cx"> 
</span><span class="cx">     this.parentGroup = parentGroup;
</span><del>-
-    var element = document.createElement(&quot;div&quot;);
-    element.className = &quot;console-group&quot;;
-    element.group = this;
-    this.element = element;
-
-    if (isNewSession)
-        element.classList.add(&quot;new-session&quot;);
-
-    var messagesElement = document.createElement(&quot;div&quot;);
-    messagesElement.className = &quot;console-group-messages&quot;;
-    element.appendChild(messagesElement);
-    this.messagesElement = messagesElement;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector.ConsoleGroup.prototype = {
</span><span class="lines">@@ -52,29 +39,42 @@
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="cx"> 
</span><del>-    addMessage: function(msg)
</del><ins>+    render: function(message)
</ins><span class="cx">     {
</span><del>-        var element = document.createElement(&quot;div&quot;);
-        element.className = WebInspector.LogContentView.ItemWrapperStyleClassName;
</del><ins>+        var groupElement = document.createElement(&quot;div&quot;);
+        groupElement.className = &quot;console-group&quot;;
+        groupElement.group = this;
+        this.element = groupElement;
</ins><span class="cx"> 
</span><del>-        msg.decorateMessageElement(element);
</del><ins>+        var titleElement = message.toMessageElement();
+        titleElement.classList.add(WebInspector.LogContentView.ItemWrapperStyleClassName);
+        titleElement.addEventListener(&quot;click&quot;, this._titleClicked.bind(this));
+        titleElement.addEventListener(&quot;mousedown&quot;, this._titleMouseDown.bind(this));
+        if (groupElement &amp;&amp; message.type === WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed)
+            groupElement.classList.add(&quot;collapsed&quot;);
</ins><span class="cx"> 
</span><del>-        if (msg.type === WebInspector.ConsoleMessage.MessageType.StartGroup || msg.type === WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed) {
-            this.messagesElement.parentNode.insertBefore(element, this.messagesElement);
-            element.addEventListener(&quot;click&quot;, this._titleClicked.bind(this));
-            element.addEventListener(&quot;mousedown&quot;, this._titleMouseDown.bind(this));
-            var groupElement = element.enclosingNodeOrSelfWithClass(&quot;console-group&quot;);
-            if (groupElement &amp;&amp; msg.type === WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed)
-                groupElement.classList.add(&quot;collapsed&quot;);
-        } else
-            this.messagesElement.appendChild(element);
</del><ins>+        groupElement.appendChild(titleElement);
+
+        var messagesElement = document.createElement(&quot;div&quot;);
+        this._messagesElement = messagesElement;
+        messagesElement.className = &quot;console-group-messages&quot;;
+        groupElement.appendChild(messagesElement);
+
+        return groupElement;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    hasMessages: function()
</del><ins>+    addMessage: function(message)
</ins><span class="cx">     {
</span><del>-        return !!this.messagesElement.childNodes.length;
</del><ins>+        var element = message.toMessageElement();
+        element.classList.add(WebInspector.LogContentView.ItemWrapperStyleClassName);
+        this.append(element);
</ins><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    append: function(messageElement)
+    {
+        this._messagesElement.appendChild(messageElement);
+    },
+
</ins><span class="cx">     // Private
</span><span class="cx"> 
</span><span class="cx">     _titleMouseDown: function(event)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsConsoleSessionjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleSession.js (0 => 180941)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleSession.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleSession.js        2015-03-03 18:10:56 UTC (rev 180941)
</span><span class="lines">@@ -0,0 +1,60 @@
</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.
+ * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.ConsoleSession = function()
+{
+    WebInspector.Object.call(this);
+
+    var element = document.createElement(&quot;div&quot;);
+    element.className = &quot;console-session&quot;;
+    this.element = element;
+    this._messagesElement = element;
+};
+
+WebInspector.ConsoleSession.prototype = {
+    constructor: WebInspector.ConsoleSession,
+
+    addMessage: function(message)
+    {
+        var messageElement = message.toMessageElement();
+        messageElement.classList.add(WebInspector.LogContentView.ItemWrapperStyleClassName);
+        this._messagesElement.appendChild(messageElement);
+    },
+
+    append: function(messageElement)
+    {
+        this._messagesElement.appendChild(messageElement);
+    },
+
+    hasMessages: function()
+    {
+        return !!this._messagesElement.childNodes.length;
+    }
+};
+
+WebInspector.ConsoleSession.prototype.__proto__ = WebInspector.Object.prototype;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsLogContentViewcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css (180940 => 180941)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css        2015-03-03 18:05:59 UTC (rev 180940)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css        2015-03-03 18:10:56 UTC (rev 180941)
</span><span class="lines">@@ -54,10 +54,6 @@
</span><span class="cx">     border-top: 1px solid rgb(240, 240, 240);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.console-group.new-session .console-group-messages .console-item:first-child {
-    border-top: none;
-}
-
</del><span class="cx"> .console-item.selected::after {
</span><span class="cx">     position: absolute;
</span><span class="cx">     display: block;
</span><span class="lines">@@ -171,7 +167,7 @@
</span><span class="cx">     position: relative;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.console-group.new-session {
</del><ins>+.console-session + .console-session {
</ins><span class="cx">     border-top: 3px dashed rgb(240, 240, 240);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>