<!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>[198499] trunk/Websites/perf.webkit.org</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/198499">198499</a></dd>
<dt>Author</dt> <dd>rniwa@webkit.org</dd>
<dt>Date</dt> <dd>2016-03-21 13:54:27 -0700 (Mon, 21 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>v3 UI sometimes don't update the list of revisions on the commit log viewer
https://bugs.webkit.org/show_bug.cgi?id=155729

Rubber-stamped by Chris Dumez.

Fixed multiple bugs that were affecting the list of blame range and commit logs for the range weren't
updated in some cases on v3 UI. Also, the commit log viewer state is now a part of the URL state so
opening and closing the commit log viewer will persist across page loads.

Also fixed a regression from <a href="http://trac.webkit.org/projects/webkit/changeset/198479">r198479</a> that Test object can't be created for a top level test.

* public/v3/components/chart-pane-base.js:
(ChartPaneBase.prototype.configure):
(ChartPaneBase.prototype._mainSelectionDidChange): Fixed the bug that the list of blame range nor the
commit log viewer don't get updated when the selected range changes.
(ChartPaneBase.prototype._indicatorDidChange):
(ChartPaneBase.prototype._didFetchData):
(ChartPaneBase.prototype._updateStatus): Extracted from _indicatorDidChange and _didFetchData.
(ChartPaneBase.prototype._requestOpeningCommitViewer): Renamed from _openCommitViewer.

* public/v3/components/chart-status-view.js:
(ChartStatusView.prototype.updateStatusIfNeeded): Fixed the bug that the blame range doesn't get set
on the initial page load when the selection range is set but the chart data hadn't been fetched yet.

* public/v3/components/commit-log-viewer.js:
(CommitLogViewer.prototype.view): Fixed the bug that we don't clear out the old list of commits while
loading the next set of commits to show as it looked as if the list was never updated.
(CommitLogViewer.prototype.render): Fixed the bug that the view always show the last repository name
even if there were nothing being fetched or commits to show.

* public/v3/components/pane-selector.js:
(PaneSelector.prototype.focus): Removed superfluous call to console.log.

* public/v3/models/data-model.js:
(DataModelObject.listForStaticMap): Generalized the code for all to fix the bug in Test.
(DataModelObject.all):

* public/v3/models/test.js:
(Test): Fixed the bug that this code was relying on the static map to be an array.
(Test.topLevelTests): Use newly added listForStaticMap to convert the dictionary to an array.

* public/v3/pages/chart-pane-status-view.js:
(ChartPaneStatusView): Always initialize _usedRevisionRange as a triple to simplify code elsewhere.
(ChartPaneStatusView.prototype.render): Invoke _revisionCallback when user clicks on a repository
expansion mark (&gt;&gt;). Also fixed click handler from the row since this made selecting revision range
on the view cumbersome. Now user has to explicitly click on the expansion mark (&gt;&gt;).
(ChartPaneStatusView.prototype._setRevisionRange): Now takes shouldNotify, from, and to as arguments
as this function must not invoke_revisionCallback inside _updateRevisionListForNewCurrentRepository.
(ChartPaneStatusView.prototype.moveRepositoryWithNotification): Use newly added setCurrentRepository
instead of manually invoking setCurrentRepository and updateRevisionListWithNotification.
(ChartPaneStatusView.prototype.setCurrentRepository): Fixed the bug that we weren't updating the
blame list here.
(ChartPaneStatusView.prototype.updateRevisionList): Renamed from updateRevisionListWithNotification
since we no longer call _revisionCallback. In general, callbacks are only meant to communicate user
initiated actions, and not program induced updates like this API so this was a bad pattern anyway.
ChartPane now explicitly updates the commit log viewer instead of relying on this function calling
_requestOpeningCommitViewer implicitly.
(ChartPaneStatusView.prototype._updateRevisionListForNewCurrentRepository): Extracted from
updateRevisionListWithNotification so that setCurrentRepository can also call this function.

* public/v3/pages/chart-pane.js:
(ChartPane.prototype._requestOpeningCommitViewer): Overrides ChartPaneBase's method. Open the same
repository in other panes via ChartsPage.setOpenRepository.
(ChartPane.prototype.setOpenRepository): This method is called when the user selected a repository in
another pane. Open the same repository in this pane if it wasn't already open.

* public/v3/pages/charts-page.js:
(ChartsPage): Added this._currentRepositoryId.
(ChartsPage.prototype.serializeState): Serialize _currentRepositoryId.
(ChartsPage.prototype.updateFromSerializedState): Set the commit log viewer's 
(ChartsPage.prototype.setOpenRepository): Added.

* tests/api-measurement-set.js: Fixed a test after <a href="http://trac.webkit.org/projects/webkit/changeset/198479">r198479</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebsitesperfwebkitorgChangeLog">trunk/Websites/perf.webkit.org/ChangeLog</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicv3componentschartpanebasejs">trunk/Websites/perf.webkit.org/public/v3/components/chart-pane-base.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicv3componentschartstatusviewjs">trunk/Websites/perf.webkit.org/public/v3/components/chart-status-view.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicv3componentscommitlogviewerjs">trunk/Websites/perf.webkit.org/public/v3/components/commit-log-viewer.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicv3componentspaneselectorjs">trunk/Websites/perf.webkit.org/public/v3/components/pane-selector.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicv3modelsdatamodeljs">trunk/Websites/perf.webkit.org/public/v3/models/data-model.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicv3modelstestjs">trunk/Websites/perf.webkit.org/public/v3/models/test.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicv3pageschartpanestatusviewjs">trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane-status-view.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicv3pageschartpanejs">trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicv3pageschartspagejs">trunk/Websites/perf.webkit.org/public/v3/pages/charts-page.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgtestsapimeasurementsetjs">trunk/Websites/perf.webkit.org/tests/api-measurement-set.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebsitesperfwebkitorgChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/ChangeLog (198498 => 198499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/ChangeLog        2016-03-21 20:23:23 UTC (rev 198498)
+++ trunk/Websites/perf.webkit.org/ChangeLog        2016-03-21 20:54:27 UTC (rev 198499)
</span><span class="lines">@@ -1,5 +1,81 @@
</span><span class="cx"> 2016-03-21  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><ins>+        v3 UI sometimes don't update the list of revisions on the commit log viewer
+        https://bugs.webkit.org/show_bug.cgi?id=155729
+
+        Rubber-stamped by Chris Dumez.
+
+        Fixed multiple bugs that were affecting the list of blame range and commit logs for the range weren't
+        updated in some cases on v3 UI. Also, the commit log viewer state is now a part of the URL state so
+        opening and closing the commit log viewer will persist across page loads.
+
+        Also fixed a regression from r198479 that Test object can't be created for a top level test.
+
+        * public/v3/components/chart-pane-base.js:
+        (ChartPaneBase.prototype.configure):
+        (ChartPaneBase.prototype._mainSelectionDidChange): Fixed the bug that the list of blame range nor the
+        commit log viewer don't get updated when the selected range changes.
+        (ChartPaneBase.prototype._indicatorDidChange):
+        (ChartPaneBase.prototype._didFetchData):
+        (ChartPaneBase.prototype._updateStatus): Extracted from _indicatorDidChange and _didFetchData.
+        (ChartPaneBase.prototype._requestOpeningCommitViewer): Renamed from _openCommitViewer.
+
+        * public/v3/components/chart-status-view.js:
+        (ChartStatusView.prototype.updateStatusIfNeeded): Fixed the bug that the blame range doesn't get set
+        on the initial page load when the selection range is set but the chart data hadn't been fetched yet.
+
+        * public/v3/components/commit-log-viewer.js:
+        (CommitLogViewer.prototype.view): Fixed the bug that we don't clear out the old list of commits while
+        loading the next set of commits to show as it looked as if the list was never updated.
+        (CommitLogViewer.prototype.render): Fixed the bug that the view always show the last repository name
+        even if there were nothing being fetched or commits to show.
+
+        * public/v3/components/pane-selector.js:
+        (PaneSelector.prototype.focus): Removed superfluous call to console.log.
+
+        * public/v3/models/data-model.js:
+        (DataModelObject.listForStaticMap): Generalized the code for all to fix the bug in Test.
+        (DataModelObject.all):
+
+        * public/v3/models/test.js:
+        (Test): Fixed the bug that this code was relying on the static map to be an array.
+        (Test.topLevelTests): Use newly added listForStaticMap to convert the dictionary to an array.
+
+        * public/v3/pages/chart-pane-status-view.js:
+        (ChartPaneStatusView): Always initialize _usedRevisionRange as a triple to simplify code elsewhere.
+        (ChartPaneStatusView.prototype.render): Invoke _revisionCallback when user clicks on a repository
+        expansion mark (&gt;&gt;). Also fixed click handler from the row since this made selecting revision range
+        on the view cumbersome. Now user has to explicitly click on the expansion mark (&gt;&gt;).
+        (ChartPaneStatusView.prototype._setRevisionRange): Now takes shouldNotify, from, and to as arguments
+        as this function must not invoke_revisionCallback inside _updateRevisionListForNewCurrentRepository.
+        (ChartPaneStatusView.prototype.moveRepositoryWithNotification): Use newly added setCurrentRepository
+        instead of manually invoking setCurrentRepository and updateRevisionListWithNotification.
+        (ChartPaneStatusView.prototype.setCurrentRepository): Fixed the bug that we weren't updating the
+        blame list here.
+        (ChartPaneStatusView.prototype.updateRevisionList): Renamed from updateRevisionListWithNotification
+        since we no longer call _revisionCallback. In general, callbacks are only meant to communicate user
+        initiated actions, and not program induced updates like this API so this was a bad pattern anyway.
+        ChartPane now explicitly updates the commit log viewer instead of relying on this function calling
+        _requestOpeningCommitViewer implicitly.
+        (ChartPaneStatusView.prototype._updateRevisionListForNewCurrentRepository): Extracted from
+        updateRevisionListWithNotification so that setCurrentRepository can also call this function.
+
+        * public/v3/pages/chart-pane.js:
+        (ChartPane.prototype._requestOpeningCommitViewer): Overrides ChartPaneBase's method. Open the same
+        repository in other panes via ChartsPage.setOpenRepository.
+        (ChartPane.prototype.setOpenRepository): This method is called when the user selected a repository in
+        another pane. Open the same repository in this pane if it wasn't already open.
+
+        * public/v3/pages/charts-page.js:
+        (ChartsPage): Added this._currentRepositoryId.
+        (ChartsPage.prototype.serializeState): Serialize _currentRepositoryId.
+        (ChartsPage.prototype.updateFromSerializedState): Set the commit log viewer's 
+        (ChartsPage.prototype.setOpenRepository): Added.
+
+        * tests/api-measurement-set.js: Fixed a test after r198479.
+
+2016-03-21  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
</ins><span class="cx">         V3 Perf Dashboard should automatically select initial range when creating a new task
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=155677
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicv3componentschartpanebasejs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/v3/components/chart-pane-base.js (198498 => 198499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/v3/components/chart-pane-base.js        2016-03-21 20:23:23 UTC (rev 198498)
+++ trunk/Websites/perf.webkit.org/public/v3/components/chart-pane-base.js        2016-03-21 20:54:27 UTC (rev 198499)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">         this._mainChart = new InteractiveTimeSeriesChart(result.sourceList, mainOptions);
</span><span class="cx">         this.renderReplace(this.content().querySelector('.chart-pane-main'), this._mainChart);
</span><span class="cx"> 
</span><del>-        this._mainChartStatus = new ChartPaneStatusView(result.metric, this._mainChart, this._openCommitViewer.bind(this));
</del><ins>+        this._mainChartStatus = new ChartPaneStatusView(result.metric, this._mainChart, this._requestOpeningCommitViewer.bind(this));
</ins><span class="cx">         this.renderReplace(this.content().querySelector('.chart-pane-details'), this._mainChartStatus);
</span><span class="cx"> 
</span><span class="cx">         this.content().querySelector('.chart-pane').addEventListener('keyup', this._keyup.bind(this));
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx"> 
</span><span class="cx">     _mainSelectionDidChange(selection, didEndDrag)
</span><span class="cx">     {
</span><del>-        this.render();
</del><ins>+        this._updateStatus();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _mainSelectionDidZoom(selection)
</span><span class="lines">@@ -109,13 +109,18 @@
</span><span class="cx"> 
</span><span class="cx">     _indicatorDidChange(indicatorID, isLocked)
</span><span class="cx">     {
</span><del>-        this._mainChartStatus.updateRevisionListWithNotification();
-        this.render();
</del><ins>+        this._updateStatus();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _didFetchData()
</span><span class="cx">     {
</span><del>-        this._mainChartStatus.updateRevisionListWithNotification();
</del><ins>+        this._updateStatus();
+    }
+
+    _updateStatus()
+    {
+        var range = this._mainChartStatus.updateRevisionList();
+        this._commitLogViewer.view(range.repository, range.from, range.to).then(this.render.bind(this));
</ins><span class="cx">         this.render();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -128,7 +133,7 @@
</span><span class="cx"> 
</span><span class="cx">     router() { return null; }
</span><span class="cx"> 
</span><del>-    _openCommitViewer(repository, from, to)
</del><ins>+    _requestOpeningCommitViewer(repository, from, to)
</ins><span class="cx">     {
</span><span class="cx">         this._mainChartStatus.setCurrentRepository(repository);
</span><span class="cx">         this._commitLogViewer.view(repository, from, to).then(this.render.bind(this));
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicv3componentschartstatusviewjs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/v3/components/chart-status-view.js (198498 => 198499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/v3/components/chart-status-view.js        2016-03-21 20:23:23 UTC (rev 198498)
+++ trunk/Websites/perf.webkit.org/public/v3/components/chart-status-view.js        2016-03-21 20:54:27 UTC (rev 198499)
</span><span class="lines">@@ -53,9 +53,9 @@
</span><span class="cx">                 var data = this._chart.sampledDataBetween('current', selection[0], selection[1]);
</span><span class="cx">                 if (!data)
</span><span class="cx">                     return false;
</span><del>-                this._usedSelection = selection;
</del><span class="cx"> 
</span><span class="cx">                 if (data &amp;&amp; data.length &gt; 1) {
</span><ins>+                    this._usedSelection = selection;
</ins><span class="cx">                     currentPoint = data[data.length - 1];
</span><span class="cx">                     previousPoint = data[0];
</span><span class="cx">                 }
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicv3componentscommitlogviewerjs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/v3/components/commit-log-viewer.js (198498 => 198499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/v3/components/commit-log-viewer.js        2016-03-21 20:23:23 UTC (rev 198498)
+++ trunk/Websites/perf.webkit.org/public/v3/components/commit-log-viewer.js        2016-03-21 20:54:27 UTC (rev 198499)
</span><span class="lines">@@ -20,15 +20,17 @@
</span><span class="cx">             this._repository = null;
</span><span class="cx">             return Promise.resolve(null);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
+        this._repository = repository;
+
</ins><span class="cx">         if (!to) {
</span><span class="cx">             this._fetchingPromise = null;
</span><ins>+            this.render();
</ins><span class="cx">             return Promise.resolve(null);
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         var promise = CommitLog.fetchBetweenRevisions(repository, from || to, to);
</span><span class="cx"> 
</span><del>-        this._repository = repository;
</del><span class="cx">         this._fetchingPromise = promise;
</span><span class="cx"> 
</span><span class="cx">         var self = this;
</span><span class="lines">@@ -42,6 +44,11 @@
</span><span class="cx">                 return;
</span><span class="cx">             self._fetchingPromise = null;
</span><span class="cx">             self._commits = commits;
</span><ins>+        }, function (error) {
+            if (self._fetchingPromise != promise)
+                return;
+            self._fetchingPromise = null;
+            self._commits = null;
</ins><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx">         return this._fetchingPromise;
</span><span class="lines">@@ -49,8 +56,10 @@
</span><span class="cx"> 
</span><span class="cx">     render()
</span><span class="cx">     {
</span><del>-        if (this._repository)
-            this.content().querySelector('caption').textContent = this._repository.name();
</del><ins>+        var caption = '';
+        if (this._repository &amp;&amp; (this._commits || this._fetchingPromise))
+            caption = this._repository.name();
+        this.content().querySelector('caption').textContent = caption;
</ins><span class="cx"> 
</span><span class="cx">         var element = ComponentBase.createElement;
</span><span class="cx">         var link = ComponentBase.createLink;
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicv3componentspaneselectorjs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/v3/components/pane-selector.js (198498 => 198499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/v3/components/pane-selector.js        2016-03-21 20:23:23 UTC (rev 198498)
+++ trunk/Websites/perf.webkit.org/public/v3/components/pane-selector.js        2016-03-21 20:54:27 UTC (rev 198499)
</span><span class="lines">@@ -23,7 +23,6 @@
</span><span class="cx">     focus()
</span><span class="cx">     {
</span><span class="cx">         var select = this.content().querySelector('select');
</span><del>-        console.log(select);
</del><span class="cx">         if (select) {
</span><span class="cx">             if (select.selectedIndex &lt; 0)
</span><span class="cx">                 select.selectedIndex = 0;
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicv3modelsdatamodeljs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/v3/models/data-model.js (198498 => 198499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/v3/models/data-model.js        2016-03-21 20:23:23 UTC (rev 198498)
+++ trunk/Websites/perf.webkit.org/public/v3/models/data-model.js        2016-03-21 20:54:27 UTC (rev 198499)
</span><span class="lines">@@ -47,10 +47,10 @@
</span><span class="cx">         return idMap ? idMap[id] : null;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static all()
</del><ins>+    static listForStaticMap(name)
</ins><span class="cx">     {
</span><span class="cx">         var list = [];
</span><del>-        var idMap = this.namedStaticMap('id');
</del><ins>+        var idMap = this.namedStaticMap(name);
</ins><span class="cx">         if (idMap) {
</span><span class="cx">             for (var id in idMap)
</span><span class="cx">                 list.push(idMap[id]);
</span><span class="lines">@@ -58,6 +58,8 @@
</span><span class="cx">         return list;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    static all() { return this.listForStaticMap('id'); }
+
</ins><span class="cx">     static cachedFetch(path, params, noCache)
</span><span class="cx">     {
</span><span class="cx">         var query = [];
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicv3modelstestjs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/v3/models/test.js (198498 => 198499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/v3/models/test.js        2016-03-21 20:23:23 UTC (rev 198498)
+++ trunk/Websites/perf.webkit.org/public/v3/models/test.js        2016-03-21 20:54:27 UTC (rev 198499)
</span><span class="lines">@@ -10,10 +10,10 @@
</span><span class="cx">         this._metrics = [];
</span><span class="cx"> 
</span><span class="cx">         if (isTopLevel)
</span><del>-            this.ensureNamedStaticMap('topLevelTests').push(this);
</del><ins>+            this.ensureNamedStaticMap('topLevelTests')[id] = this;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static topLevelTests() { return this.sortByName(this.namedStaticMap('topLevelTests')); }
</del><ins>+    static topLevelTests() { return this.sortByName(this.listForStaticMap('topLevelTests')); }
</ins><span class="cx"> 
</span><span class="cx">     parentTest() { return this._parent; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicv3pageschartpanestatusviewjs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane-status-view.js (198498 => 198499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane-status-view.js        2016-03-21 20:23:23 UTC (rev 198498)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane-status-view.js        2016-03-21 20:54:27 UTC (rev 198499)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx">         this._renderedRevisionList = null;
</span><span class="cx">         this._renderedRepository = null;
</span><span class="cx"> 
</span><del>-        this._usedRevisionRange = null;
</del><ins>+        this._usedRevisionRange = [null, null, null];
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     pointsRangeForAnalysis() { return this._pointsRangeForAnalysis; }
</span><span class="lines">@@ -38,12 +38,12 @@
</span><span class="cx">             var selected = info.repository == self._currentRepository;
</span><span class="cx">             var action = function () {
</span><span class="cx">                 if (self._currentRepository == info.repository)
</span><del>-                    self._setRevisionRange(null, null, null);
</del><ins>+                    self._setRevisionRange(true, null, null, null);
</ins><span class="cx">                 else
</span><del>-                    self._setRevisionRange(info.repository, info.from, info.to);
</del><ins>+                    self._setRevisionRange(true, info.repository, info.from, info.to);
</ins><span class="cx">             };
</span><span class="cx"> 
</span><del>-            return element('tr', {class: selected ? 'selected' : '', onclick: action}, [
</del><ins>+            return element('tr', {class: selected ? 'selected' : ''}, [
</ins><span class="cx">                 element('td', info.repository.name()),
</span><span class="cx">                 element('td', info.url ? link(info.label, info.label, info.url, true) : info.label),
</span><span class="cx">                 element('td', {class: 'commit-viewer-opener'}, link('\u00BB', action)),
</span><span class="lines">@@ -74,16 +74,17 @@
</span><span class="cx">     setCurrentRepository(repository)
</span><span class="cx">     {
</span><span class="cx">         this._currentRepository = repository;
</span><del>-        this._forceRender = true;
</del><ins>+        return this._updateRevisionListForNewCurrentRepository();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    _setRevisionRange(repository, from, to)
</del><ins>+    _setRevisionRange(shouldNotify, repository, from, to)
</ins><span class="cx">     {
</span><del>-        if (this._usedRevisionRange &amp;&amp; this._usedRevisionRange[0] == repository
</del><ins>+        if (this._usedRevisionRange[0] == repository
</ins><span class="cx">             &amp;&amp; this._usedRevisionRange[1] == from &amp;&amp; this._usedRevisionRange[2] == to)
</span><span class="cx">             return;
</span><span class="cx">         this._usedRevisionRange = [repository, from, to];
</span><del>-        this._revisionCallback(repository, from, to);
</del><ins>+        if (shouldNotify)
+            this._revisionCallback(repository, from, to);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     moveRepositoryWithNotification(forward)
</span><span class="lines">@@ -99,26 +100,32 @@
</span><span class="cx">         if (newIndex == index)
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><del>-        var info = this._revisionList[newIndex];
-        this.setCurrentRepository(info.repository);
-        this.updateRevisionListWithNotification();
</del><ins>+        var item = this._revisionList[newIndex];
+        this.setCurrentRepository(item ? item.repository : null);
+
+        return true;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    updateRevisionListWithNotification()
</del><ins>+    updateRevisionList()
</ins><span class="cx">     {
</span><span class="cx">         if (!this._currentRepository)
</span><del>-            return;
</del><ins>+            return {repository: null, from: null, to: null};
+        return this._updateRevisionListForNewCurrentRepository();
+    }
</ins><span class="cx"> 
</span><ins>+    _updateRevisionListForNewCurrentRepository()
+    {
</ins><span class="cx">         this.updateStatusIfNeeded();
</span><span class="cx"> 
</span><span class="cx">         this._forceRender = true;
</span><span class="cx">         for (var info of this._revisionList) {
</span><span class="cx">             if (info.repository == this._currentRepository) {
</span><del>-                this._setRevisionRange(info.repository, info.from, info.to);
-                return;
</del><ins>+                this._setRevisionRange(false, info.repository, info.from, info.to);
+                return {repository: info.repository, from: info.from, to: info.to};
</ins><span class="cx">             }
</span><span class="cx">         }
</span><del>-        this._setRevisionRange(this._currentRepository, null, null);
</del><ins>+        this._setRevisionRange(false, null, null, null);
+        return {repository: this._currentRepository, from: null, to: null};
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     computeChartStatusLabels(currentPoint, previousPoint)
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicv3pageschartpanejs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane.js (198498 => 198499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane.js        2016-03-21 20:23:23 UTC (rev 198498)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane.js        2016-03-21 20:54:27 UTC (rev 198499)
</span><span class="lines">@@ -65,6 +65,21 @@
</span><span class="cx"> 
</span><span class="cx">     router() { return this._chartsPage.router(); }
</span><span class="cx"> 
</span><ins>+    _requestOpeningCommitViewer(repository, from, to)
+    {
+        super._requestOpeningCommitViewer(repository, from, to);
+        this._chartsPage.setOpenRepository(repository);
+    }
+
+    setOpenRepository(repository)
+    {
+        if (repository != this._commitLogViewer.currentRepository()) {
+            var range = this._mainChartStatus.setCurrentRepository(repository);
+            this._commitLogViewer.view(repository, range.from, range.to).then(this.render.bind(this));
+            this.render();
+        }
+    }
+
</ins><span class="cx">     _indicatorDidChange(indicatorID, isLocked)
</span><span class="cx">     {
</span><span class="cx">         this._mainChartIndicatorWasLocked = isLocked;
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicv3pageschartspagejs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/v3/pages/charts-page.js (198498 => 198499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/v3/pages/charts-page.js        2016-03-21 20:23:23 UTC (rev 198498)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/charts-page.js        2016-03-21 20:54:27 UTC (rev 198499)
</span><span class="lines">@@ -7,6 +7,7 @@
</span><span class="cx">         this._paneList = [];
</span><span class="cx">         this._paneListChanged = false;
</span><span class="cx">         this._mainDomain = null;
</span><ins>+        this._currentRepositoryId = null;
</ins><span class="cx"> 
</span><span class="cx">         toolbar.setAddPaneCallback(this.insertPaneAfter.bind(this));
</span><span class="cx">     }
</span><span class="lines">@@ -54,6 +55,10 @@
</span><span class="cx">         if (serializedPaneList.length)
</span><span class="cx">             state['paneList'] = serializedPaneList;
</span><span class="cx"> 
</span><ins>+        var repository = this._currentRepositoryId;
+        if (repository)
+            state['repository'] = this._currentRepositoryId;
+
</ins><span class="cx">         return state;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -72,9 +77,14 @@
</span><span class="cx"> 
</span><span class="cx">         this._updateDomainsFromSerializedState(state);
</span><span class="cx"> 
</span><ins>+        this._currentRepositoryId = parseInt(state['repository']);
+        var currentRepository = Repository.findById(this._currentRepositoryId);
+
</ins><span class="cx">         console.assert(this._paneList.length == paneList.length);
</span><del>-        for (var i = 0; i &lt; this._paneList.length; i++)
</del><ins>+        for (var i = 0; i &lt; this._paneList.length; i++) {
</ins><span class="cx">             this._paneList[i].updateFromSerializedState(state.paneList[i], isOpen);
</span><ins>+            this._paneList[i].setOpenRepository(currentRepository);
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _updateDomainsFromSerializedState(state)
</span><span class="lines">@@ -168,6 +178,14 @@
</span><span class="cx">             this.scheduleUrlStateUpdate();
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    setOpenRepository(repository)
+    {
+        this._currentRepositoryId = repository ? repository.id() : null;
+        for (var pane of this._paneList)
+            pane.setOpenRepository(repository);
+        this.scheduleUrlStateUpdate();
+    }
+
</ins><span class="cx">     _updateOverviewDomain()
</span><span class="cx">     {
</span><span class="cx">         var startTime = this.toolbar().startTime();
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgtestsapimeasurementsetjs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/tests/api-measurement-set.js (198498 => 198499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/tests/api-measurement-set.js        2016-03-21 20:23:23 UTC (rev 198498)
+++ trunk/Websites/perf.webkit.org/tests/api-measurement-set.js        2016-03-21 20:54:27 UTC (rev 198499)
</span><span class="lines">@@ -304,7 +304,7 @@
</span><span class="cx">                            sum: 65,
</span><span class="cx">                            squareSum: 855,
</span><span class="cx">                            markedOutlier: false,
</span><del>-                           revisions: [[repositoryId, '144000', revisionTime]],
</del><ins>+                           revisions: [[1, repositoryId, '144000', revisionTime]],
</ins><span class="cx">                            commitTime: revisionTime,
</span><span class="cx">                            buildTime: revisionBuildTime,
</span><span class="cx">                            buildNumber: '124' });
</span></span></pre>
</div>
</div>

</body>
</html>