<!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>[202133] 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/202133">202133</a></dd>
<dt>Author</dt> <dd>mattbaker@apple.com</dd>
<dt>Date</dt> <dd>2016-06-16 12:39:10 -0700 (Thu, 16 Jun 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: DataGrid should manage its own settings
https://bugs.webkit.org/show_bug.cgi?id=158675
&lt;rdar://problem/26761338&gt;

Reviewed by Timothy Hatcher.

Move grid sorting settings (sort order, column identifier) into DataGrid,
removing duplicated code from various views. A new grid method, &quot;createSettings&quot;,
takes an identifier which is used as a prefix for naming the grid's settings.

So that the new behavior is easy to use and hard to misuse, default values
for each setting are set to the current value of the associated property.
The result is that:

    grid.sortColumnIdentifier = &quot;columnA&quot;;
    grid.createSettings(&quot;myGrid&quot;);

will use &quot;columnA&quot; as the default value the first time the setting is created.

* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._rebuildTable):
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView):
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.createSettings):
(WebInspector.DataGrid.prototype.get identifier): Deleted.
(WebInspector.DataGrid.prototype.set identifier): Deleted.
(WebInspector.DataGrid.prototype.set sortOrderSetting): Deleted.
(WebInspector.DataGrid.prototype.set sortColumnIdentifierSetting): Deleted.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
* UserInterface/Views/HeapSnapshotContentView.js:
(WebInspector.HeapSnapshotContentView):
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
* UserInterface/Views/ProfileView.js:
(WebInspector.ProfileView):
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsApplicationCacheFrameContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsCookieStorageContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDOMStorageContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDataGridjs">trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapAllocationsTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsLayerTreeDetailsSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsLayoutTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNetworkGridContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNetworkTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsProfileViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ProfileView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsRenderingFrameTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsScriptDetailsTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ScriptDetailsTimelineView.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (202132 => 202133)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-06-16 18:49:14 UTC (rev 202132)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-06-16 19:39:10 UTC (rev 202133)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2016-06-16  Matt Baker  &lt;mattbaker@apple.com&gt;
+
+        Web Inspector: DataGrid should manage its own settings
+        https://bugs.webkit.org/show_bug.cgi?id=158675
+        &lt;rdar://problem/26761338&gt;
+
+        Reviewed by Timothy Hatcher.
+
+        Move grid sorting settings (sort order, column identifier) into DataGrid,
+        removing duplicated code from various views. A new grid method, &quot;createSettings&quot;,
+        takes an identifier which is used as a prefix for naming the grid's settings.
+
+        So that the new behavior is easy to use and hard to misuse, default values
+        for each setting are set to the current value of the associated property.
+        The result is that:
+
+            grid.sortColumnIdentifier = &quot;columnA&quot;;
+            grid.createSettings(&quot;myGrid&quot;);
+
+        will use &quot;columnA&quot; as the default value the first time the setting is created.
+
+        * UserInterface/Views/ApplicationCacheFrameContentView.js:
+        (WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
+        * UserInterface/Views/CookieStorageContentView.js:
+        (WebInspector.CookieStorageContentView.prototype._rebuildTable):
+        * UserInterface/Views/DOMStorageContentView.js:
+        (WebInspector.DOMStorageContentView):
+        * UserInterface/Views/DataGrid.js:
+        (WebInspector.DataGrid):
+        (WebInspector.DataGrid.prototype.createSettings):
+        (WebInspector.DataGrid.prototype.get identifier): Deleted.
+        (WebInspector.DataGrid.prototype.set identifier): Deleted.
+        (WebInspector.DataGrid.prototype.set sortOrderSetting): Deleted.
+        (WebInspector.DataGrid.prototype.set sortColumnIdentifierSetting): Deleted.
+        * UserInterface/Views/HeapAllocationsTimelineView.js:
+        (WebInspector.HeapAllocationsTimelineView):
+        * UserInterface/Views/HeapSnapshotContentView.js:
+        (WebInspector.HeapSnapshotContentView):
+        * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
+        (WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
+        * UserInterface/Views/LayoutTimelineView.js:
+        (WebInspector.LayoutTimelineView):
+        * UserInterface/Views/NetworkGridContentView.js:
+        (WebInspector.NetworkGridContentView):
+        * UserInterface/Views/NetworkTimelineView.js:
+        (WebInspector.NetworkTimelineView):
+        * UserInterface/Views/ProfileView.js:
+        (WebInspector.ProfileView):
+        * UserInterface/Views/RenderingFrameTimelineView.js:
+        (WebInspector.RenderingFrameTimelineView):
+        * UserInterface/Views/ScriptDetailsTimelineView.js:
+        (WebInspector.ScriptDetailsTimelineView):
+
</ins><span class="cx"> 2016-06-15  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Uncaught Exception: TypeError: undefined is not an object (evaluating 'imageElement.classList')
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsApplicationCacheFrameContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameContentView.js (202132 => 202133)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameContentView.js        2016-06-16 18:49:14 UTC (rev 202132)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameContentView.js        2016-06-16 19:39:10 UTC (rev 202133)
</span><span class="lines">@@ -162,8 +162,9 @@
</span><span class="cx">         this._dataGrid = new WebInspector.DataGrid(columns);
</span><span class="cx">         this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SortChanged, this._sortDataGrid, this);
</span><span class="cx"> 
</span><del>-        this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting(&quot;application-cache-frame-content-view-sort&quot;, &quot;url&quot;);
-        this._dataGrid.sortOrderSetting = new WebInspector.Setting(&quot;application-cache-frame-content-view-sort-order&quot;, WebInspector.DataGrid.SortOrder.Ascending);
</del><ins>+        this._dataGrid.sortColumnIdentifier = &quot;url&quot;;
+        this._dataGrid.sortOrder = WebInspector.DataGrid.SortOrder.Ascending;
+        this._dataGrid.createSettings(&quot;application-cache-frame-content-view&quot;);
</ins><span class="cx"> 
</span><span class="cx">         this.addSubview(this._dataGrid);
</span><span class="cx">         this._dataGrid.updateLayout();
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsCookieStorageContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js (202132 => 202133)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js        2016-06-16 18:49:14 UTC (rev 202132)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js        2016-06-16 19:39:10 UTC (rev 202133)
</span><span class="lines">@@ -145,8 +145,8 @@
</span><span class="cx">             this._dataGrid.appendChild(node);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting(&quot;cookie-storage-content-view-sort&quot;, &quot;name&quot;);
-        this._dataGrid.sortOrderSetting = new WebInspector.Setting(&quot;cookie-storage-content-view-sort-order&quot;, WebInspector.DataGrid.SortOrder.Indeterminate);
</del><ins>+        this._dataGrid.sortColumnIdentifier = &quot;name&quot;;
+        this._dataGrid.createSettings(&quot;cookie-storage-content-view&quot;);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _filterCookies(cookies)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDOMStorageContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js (202132 => 202133)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js        2016-06-16 18:49:14 UTC (rev 202132)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js        2016-06-16 19:39:10 UTC (rev 202133)
</span><span class="lines">@@ -42,8 +42,9 @@
</span><span class="cx">         columns.value = {title: WebInspector.UIString(&quot;Value&quot;), sortable: true};
</span><span class="cx"> 
</span><span class="cx">         this._dataGrid = new WebInspector.DataGrid(columns, this._editingCallback.bind(this), this._deleteCallback.bind(this));
</span><del>-        this._dataGrid.sortOrderSetting = new WebInspector.Setting(&quot;dom-storage-content-view-sort-order&quot;, WebInspector.DataGrid.SortOrder.Ascending);
-        this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting(&quot;dom-storage-content-view-sort&quot;, &quot;key&quot;);
</del><ins>+        this._dataGrid.sortOrder = WebInspector.DataGrid.SortOrder.Ascending;
+        this._dataGrid.sortColumnIdentifier = &quot;key&quot;;
+        this._dataGrid.createSettings(&quot;dom-storage-content-view&quot;);
</ins><span class="cx">         this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SortChanged, this._sortDataGrid, this);
</span><span class="cx"> 
</span><span class="cx">         this.addSubview(this._dataGrid);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDataGridjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js (202132 => 202133)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js        2016-06-16 18:49:14 UTC (rev 202132)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js        2016-06-16 19:39:10 UTC (rev 202133)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx">         this.columns = new Map;
</span><span class="cx">         this.orderedColumns = [];
</span><span class="cx"> 
</span><del>-        this._identifier = null;
</del><ins>+        this._settingsIdentifier = null;
</ins><span class="cx">         this._sortColumnIdentifier = null;
</span><span class="cx">         this._sortColumnIdentifierSetting = null;
</span><span class="cx">         this._sortOrder = WebInspector.DataGrid.SortOrder.Indeterminate;
</span><span class="lines">@@ -209,27 +209,6 @@
</span><span class="cx">         return dataGrid;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    get identifier() { return this._identifier; }
-
-    set identifier(x)
-    {
-        console.assert(x &amp;&amp; typeof x === &quot;string&quot;);
-
-        if (this._identifier === x)
-            return;
-
-        this._identifier = x;
-
-        // FIXME: Add sortColumnIdentifierSetting and sortOrderSetting as part of &lt;webkit.org/b/158675&gt;.
-        this._hiddenColumnSetting = new WebInspector.Setting(this._identifier + &quot;-hidden-columns&quot;, []);
-
-        if (!this.columns)
-            return;
-
-        for (let columnIdentifier of this._hiddenColumnSetting.value)
-            this.setColumnVisible(columnIdentifier, false);
-    }
-
</del><span class="cx">     get columnChooserEnabled() { return this._columnChooserEnabled; }
</span><span class="cx">     set columnChooserEnabled(x) { this._columnChooserEnabled = x; }
</span><span class="cx"> 
</span><span class="lines">@@ -269,15 +248,6 @@
</span><span class="cx">         this.dispatchEventToListeners(WebInspector.DataGrid.Event.SortChanged);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    set sortOrderSetting(setting)
-    {
-        console.assert(setting instanceof WebInspector.Setting);
-
-        this._sortOrderSetting = setting;
-        if (this._sortOrderSetting.value)
-            this.sortOrder = this._sortOrderSetting.value;
-    }
-
</del><span class="cx">     get sortColumnIdentifier()
</span><span class="cx">     {
</span><span class="cx">         return this._sortColumnIdentifier;
</span><span class="lines">@@ -296,15 +266,6 @@
</span><span class="cx">         this._updateSortedColumn(oldSortColumnIdentifier);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    set sortColumnIdentifierSetting(setting)
-    {
-        console.assert(setting instanceof WebInspector.Setting);
-
-        this._sortColumnIdentifierSetting = setting;
-        if (this._sortColumnIdentifierSetting.value)
-            this.sortColumnIdentifier = this._sortColumnIdentifierSetting.value;
-    }
-
</del><span class="cx">     get inline() { return this._inline; }
</span><span class="cx"> 
</span><span class="cx">     set inline(x)
</span><span class="lines">@@ -377,6 +338,30 @@
</span><span class="cx">         return this._filterDelegate.dataGridMatchNodeAgainstCustomFilters(node);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    createSettings(identifier)
+    {
+        console.assert(identifier &amp;&amp; typeof identifier === &quot;string&quot;);
+        if (this._settingsIdentifier === identifier)
+            return;
+
+        this._settingsIdentifier = identifier;
+
+        this._sortColumnIdentifierSetting = new WebInspector.Setting(this._settingsIdentifier + &quot;-sort&quot;, this._sortColumnIdentifier);
+        this._sortOrderSetting = new WebInspector.Setting(this._settingsIdentifier + &quot;-sort-order&quot;, this._sortOrder);
+        this._hiddenColumnSetting = new WebInspector.Setting(this._settingsIdentifier + &quot;-hidden-columns&quot;, []);
+
+        if (!this.columns)
+            return;
+
+        if (this._sortColumnIdentifierSetting.value) {
+            this.sortColumnIdentifier = this._sortColumnIdentifierSetting.value;
+            this.sortOrder = this._sortOrderSetting.value;
+        }
+
+        for (let columnIdentifier of this._hiddenColumnSetting.value)
+            this.showColumn(columnIdentifier, false);
+    }
+
</ins><span class="cx">     _updateScrollListeners()
</span><span class="cx">     {
</span><span class="cx">         if (this._inline || this._variableHeightRows) {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapAllocationsTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js (202132 => 202133)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js        2016-06-16 18:49:14 UTC (rev 202132)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js        2016-06-16 19:39:10 UTC (rev 202133)
</span><span class="lines">@@ -77,9 +77,11 @@
</span><span class="cx">         this._snapshotListPathComponent.addEventListener(WebInspector.HierarchicalPathComponent.Event.Clicked, this._snapshotListPathComponentClicked, this);
</span><span class="cx"> 
</span><span class="cx">         this._dataGrid = new WebInspector.TimelineDataGrid(columns);
</span><del>-        this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting(&quot;heap-allocations-timeline-view-sort&quot;, &quot;timestamp&quot;);
-        this._dataGrid.sortOrderSetting = new WebInspector.Setting(&quot;heap-allocations-timeline-view-sort-order&quot;, WebInspector.DataGrid.SortOrder.Ascending);
</del><ins>+        this._dataGrid.sortColumnIdentifier = &quot;timestamp&quot;;
+        this._dataGrid.sortOrder = WebInspector.DataGrid.SortOrder.Ascending;
+        this._dataGrid.createSettings(&quot;heap-allocations-timeline-view&quot;);
</ins><span class="cx">         this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._dataGridNodeSelected, this);
</span><ins>+
</ins><span class="cx">         this.addSubview(this._dataGrid);
</span><span class="cx"> 
</span><span class="cx">         this._contentViewContainer = new WebInspector.ContentViewContainer;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotContentView.js (202132 => 202133)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotContentView.js        2016-06-16 18:49:14 UTC (rev 202132)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotContentView.js        2016-06-16 19:39:10 UTC (rev 202133)
</span><span class="lines">@@ -34,8 +34,9 @@
</span><span class="cx">         this.element.classList.add(&quot;heap-snapshot&quot;);
</span><span class="cx"> 
</span><span class="cx">         this._dataGrid = new WebInspector.DataGrid(columns);
</span><del>-        this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting(identifier + &quot;-sort&quot;, &quot;retainedSize&quot;);
-        this._dataGrid.sortOrderSetting = new WebInspector.Setting(identifier + &quot;-sort-order&quot;, WebInspector.DataGrid.SortOrder.Descending);
</del><ins>+        this._dataGrid.sortColumnIdentifier = &quot;retainedSize&quot;;
+        this._dataGrid.sortOrder = WebInspector.DataGrid.SortOrder.Descending;
+        this._dataGrid.createSettings(identifier);
</ins><span class="cx">         this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SortChanged, this._sortDataGrid, this);
</span><span class="cx"> 
</span><span class="cx">         let sortComparator = WebInspector.HeapSnapshotDataGridTree.buildSortComparator(this._dataGrid.sortColumnIdentifier, this._dataGrid.sortOrder);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsLayerTreeDetailsSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js (202132 => 202133)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js        2016-06-16 18:49:14 UTC (rev 202132)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js        2016-06-16 19:39:10 UTC (rev 202133)
</span><span class="lines">@@ -142,8 +142,9 @@
</span><span class="cx">         this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SortChanged, this._sortDataGrid, this);
</span><span class="cx">         this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._selectedDataGridNodeChanged, this);
</span><span class="cx"> 
</span><del>-        this.sortColumnIdentifierSetting = new WebInspector.Setting(&quot;layer-tree-details-sidebar-panel-sort&quot;, &quot;memory&quot;);
-        this.sortOrderSetting = new WebInspector.Setting(&quot;layer-tree-details-sidebar-panel-sort-order&quot;, WebInspector.DataGrid.SortOrder.Descending);
</del><ins>+        this._dataGrid.sortColumnIdentifier = &quot;memory&quot;;
+        this._dataGrid.sortOrder = WebInspector.DataGrid.SortOrder.Descending;
+        this._dataGrid.createSettings(&quot;layer-tree-details-sidebar-panel&quot;);
</ins><span class="cx"> 
</span><span class="cx">         var element = this._dataGrid.element;
</span><span class="cx">         element.addEventListener(&quot;focus&quot;, this._dataGridGainedFocus.bind(this), false);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsLayoutTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js (202132 => 202133)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js        2016-06-16 18:49:14 UTC (rev 202132)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js        2016-06-16 19:39:10 UTC (rev 202133)
</span><span class="lines">@@ -77,12 +77,10 @@
</span><span class="cx"> 
</span><span class="cx">         this.setupDataGrid(this._dataGrid);
</span><span class="cx"> 
</span><del>-        this._dataGrid.identifier = &quot;layout-timeline-view&quot;;
</del><ins>+        this._dataGrid.sortColumnIdentifier = &quot;startTime&quot;;
+        this._dataGrid.sortOrder = WebInspector.DataGrid.SortOrder.Ascending;
+        this._dataGrid.createSettings(&quot;layout-timeline-view&quot;);
</ins><span class="cx"> 
</span><del>-        // FIXME: Remove once &lt;webkit.org/b/158675&gt; is fixed.
-        this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting(&quot;layout-timeline-view-sort&quot;, &quot;startTime&quot;);
-        this._dataGrid.sortOrderSetting = new WebInspector.Setting(&quot;layout-timeline-view-sort-order&quot;, WebInspector.DataGrid.SortOrder.Ascending);
-
</del><span class="cx">         this._hoveredTreeElement = null;
</span><span class="cx">         this._hoveredDataGridNode = null;
</span><span class="cx">         this._showingHighlight = false;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNetworkGridContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js (202132 => 202133)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js        2016-06-16 18:49:14 UTC (rev 202132)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js        2016-06-16 19:39:10 UTC (rev 202133)
</span><span class="lines">@@ -82,8 +82,9 @@
</span><span class="cx"> 
</span><span class="cx">         this._dataGrid = new WebInspector.TimelineDataGrid(columns, this._contentTreeOutline);
</span><span class="cx">         this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._dataGridNodeSelected, this);
</span><del>-        this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting(&quot;network-grid-content-view-sort&quot;, &quot;requestSent&quot;);
-        this._dataGrid.sortOrderSetting = new WebInspector.Setting(&quot;network-grid-content-view-sort-order&quot;, WebInspector.DataGrid.SortOrder.Ascending);
</del><ins>+        this._dataGrid.sortColumnIdentifier = &quot;requestSent&quot;;
+        this._dataGrid.sortOrder = WebInspector.DataGrid.SortOrder.Ascending;
+        this._dataGrid.createSettings(&quot;network-grid-content-view&quot;);
</ins><span class="cx"> 
</span><span class="cx">         this.element.classList.add(&quot;network-grid&quot;);
</span><span class="cx">         this.addSubview(this._dataGrid);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNetworkTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js (202132 => 202133)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js        2016-06-16 18:49:14 UTC (rev 202132)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js        2016-06-16 19:39:10 UTC (rev 202133)
</span><span class="lines">@@ -89,13 +89,11 @@
</span><span class="cx">             columns[column].sortable = true;
</span><span class="cx"> 
</span><span class="cx">         this._dataGrid = new WebInspector.TimelineDataGrid(columns);
</span><del>-        this._dataGrid.identifier = &quot;network-timeline-view&quot;;
</del><span class="cx">         this._dataGrid.sortDelegate = this;
</span><ins>+        this._dataGrid.sortColumnIdentifier = &quot;requestSent&quot;;
+        this._dataGrid.sortOrder = WebInspector.DataGrid.SortOrder.Ascending;
+        this._dataGrid.createSettings(&quot;network-timeline-view&quot;);
</ins><span class="cx"> 
</span><del>-        // FIXME: Remove once &lt;webkit.org/b/158675&gt; is fixed.
-        this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting(&quot;network-timeline-view-sort&quot;, &quot;requestSent&quot;);
-        this._dataGrid.sortOrderSetting = new WebInspector.Setting(&quot;network-timeline-view-sort-order&quot;, WebInspector.DataGrid.SortOrder.Ascending);
-
</del><span class="cx">         this.setupDataGrid(this._dataGrid);
</span><span class="cx"> 
</span><span class="cx">         this.element.classList.add(&quot;network&quot;);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsProfileViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProfileView.js (202132 => 202133)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ProfileView.js        2016-06-16 18:49:14 UTC (rev 202132)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProfileView.js        2016-06-16 19:39:10 UTC (rev 202133)
</span><span class="lines">@@ -65,8 +65,9 @@
</span><span class="cx">         this._dataGrid.element.addEventListener(&quot;mouseover&quot;, this._mouseOverDataGrid.bind(this));
</span><span class="cx">         this._dataGrid.element.addEventListener(&quot;mouseleave&quot;, this._mouseLeaveDataGrid.bind(this));
</span><span class="cx">         this._dataGrid.indentWidth = 20;
</span><del>-        this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting(&quot;profile-view-sort&quot;, &quot;totalTime&quot;);
-        this._dataGrid.sortOrderSetting = new WebInspector.Setting(&quot;profile-view-sort-order&quot;, WebInspector.DataGrid.SortOrder.Descending);
</del><ins>+        this._dataGrid.sortColumnIdentifier = &quot;totalTime&quot;;
+        this._dataGrid.sortOrder = WebInspector.DataGrid.SortOrder.Descending;
+        this._dataGrid.createSettings(&quot;profile-view&quot;);
</ins><span class="cx"> 
</span><span class="cx">         this.addSubview(this._dataGrid);
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsRenderingFrameTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js (202132 => 202133)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js        2016-06-16 18:49:14 UTC (rev 202132)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js        2016-06-16 19:39:10 UTC (rev 202133)
</span><span class="lines">@@ -78,12 +78,10 @@
</span><span class="cx">             columns[column].sortable = true;
</span><span class="cx"> 
</span><span class="cx">         this._dataGrid = new WebInspector.TimelineDataGrid(columns);
</span><del>-        this._dataGrid.identifier = &quot;rendering-frame-timeline-view&quot;;
</del><ins>+        this._dataGrid.sortColumnIdentifier = &quot;startTime&quot;;
+        this._dataGrid.sortOrder = WebInspector.DataGrid.SortOrder.Ascending;
+        this._dataGrid.createSettings(&quot;rendering-frame-timeline-view&quot;);
</ins><span class="cx"> 
</span><del>-        // FIXME: Remove once &lt;webkit.org/b/158675&gt; is fixed.
-        this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting(&quot;rendering-frame-timeline-view-sort&quot;, &quot;startTime&quot;);
-        this._dataGrid.sortOrderSetting = new WebInspector.Setting(&quot;rendering-frame-timeline-view-sort-order&quot;, WebInspector.DataGrid.SortOrder.Ascending);
-
</del><span class="cx">         this.setupDataGrid(this._dataGrid);
</span><span class="cx"> 
</span><span class="cx">         this.element.classList.add(&quot;rendering-frame&quot;);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsScriptDetailsTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptDetailsTimelineView.js (202132 => 202133)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptDetailsTimelineView.js        2016-06-16 18:49:14 UTC (rev 202132)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptDetailsTimelineView.js        2016-06-16 19:39:10 UTC (rev 202133)
</span><span class="lines">@@ -73,13 +73,11 @@
</span><span class="cx">             columns[column].sortable = true;
</span><span class="cx"> 
</span><span class="cx">         this._dataGrid = new WebInspector.ScriptTimelineDataGrid(columns);
</span><del>-        this._dataGrid.identifier = &quot;script-timeline-view&quot;;
</del><span class="cx">         this._dataGrid.sortDelegate = this;
</span><ins>+        this._dataGrid.sortColumnIdentifier = &quot;startTime&quot;;
+        this._dataGrid.sortOrder = WebInspector.DataGrid.SortOrder.Ascending;
+        this._dataGrid.createSettings(&quot;script-timeline-view&quot;);
</ins><span class="cx"> 
</span><del>-        // FIXME: Remove once &lt;webkit.org/b/158675&gt; is fixed.
-        this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting(&quot;script-timeline-view-sort&quot;, &quot;startTime&quot;);
-        this._dataGrid.sortOrderSetting = new WebInspector.Setting(&quot;script-timeline-view-sort-order&quot;, WebInspector.DataGrid.SortOrder.Ascending);
-
</del><span class="cx">         this.setupDataGrid(this._dataGrid);
</span><span class="cx"> 
</span><span class="cx">         this.element.classList.add(&quot;script&quot;);
</span></span></pre>
</div>
</div>

</body>
</html>