<!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>[189925] trunk/Tools</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/189925">189925</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-09-17 12:42:37 -0700 (Thu, 17 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Added toggle options for hiding and showing certain platform families on the dashboard.
https://bugs.webkit.org/show_bug.cgi?id=148403

Patch by Dean Johnson &lt;dean_johnson@apple.com&gt; on 2015-09-17
Reviewed by David Kilzer.

This patch removes &quot;hiddenPlatforms&quot; from use in the code and local storage. We also removed
individual hide/show buttons for platforms because we've added toggle options to hide/show entire
families. Examples of these are &quot;mac&quot;, &quot;ios&quot;, and &quot;linux&quot;. &quot;Show All Platforms&quot; was also removed
in lieu of an &quot;all&quot; button in the toggle menu.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js:
(parsePlatformFamily): Helper function to parse out a platform family.
(initPlatformsByFamily): Initializes platformsByFamily, which organizes platforms on the
page by platformsByFamily[&lt;family&gt;] = &lt;list of platforms belonging to that family&gt;.
(updateToggleButtons): Updates the status of the toggle buttons.
(updateHiddenPlatforms): Changed to work with the new implementation of hiding/showing platforms.
(documentReady): Added creation of toggle buttons.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsMain.js:
(unhiddenQueues): Updated to search by platform family instead of the individual platform name.
(documentReady): Changed hiddenPlatforms =&gt; hiddenPlatformFamilies.
(updateHiddenPlatforms): Deleted. After removing the individual hide button code,
this did the exact same thing as the updateHiddenPlatforms in Scripts/Main.js so it was removed.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/QueueView.js:
(QueueView): Updated to use hiddenPlatformFamilies.
(QueueView.prototype._updateHiddenState): Updated to use hiddenPlatformFamilies.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Settings.js:
(Settings.prototype.toggleHiddenPlatformFamily): Renamed function and some variables.
(Settings.prototype.clearHiddenPlatformFamilies): Now uses hiddenPlatformFamilies for events.
(Settings.prototype.toggleHiddenPlatform): Deleted.
(Settings.prototype.clearHiddenPlatforms): Deleted.
(Settings.prototype.toggleShowPlatformFamily): Deleted.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
(div.cellButton, div.accessibilityButton, div.platformFamilyToggleButton):
(div.cellButton.unhide, div.accessibilityButton.unhide, div.platformFamilyToggleButton.unhide):
(.settings-visible div.settingsWrapper.hide, .settings-visible div.settingsWrapper):
(table.queue-grid tr.headers th):
(div.settingsWrapper.hide):
(div.settingsWrapper):
(div.familyToggleWrapper):
(div.platformFamilyToggleButton):
(div.platformFamilyShowToggleButton:not(:last-child)):
(div.familyShown):
(div.accessibilityButton):
(div.cellButton, div.accessibilityButton): Added platformFamilyToggleButton class.
(div.cellButton.unhide, div.accessibilityButton.unhide): Added platformFamilyToggleButton class.
(.settings-visible div.accessibilityButton.hide, .settings-visible div.accessibilityButton.unhide): Added
platformFamilyToggleButton and settingsWrapper class.
(.accessibilityButton): Deleted.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsMainjs">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js</a></li>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsMetricsMainjs">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsMain.js</a></li>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsQueueViewjs">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/QueueView.js</a></li>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsSettingsjs">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Settings.js</a></li>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardStylesMaincss">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsMainjs"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js (189924 => 189925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js        2015-09-17 19:29:38 UTC (rev 189924)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js        2015-09-17 19:42:37 UTC (rev 189925)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> var BubblesCategory = &quot;bubbles&quot;;
</span><span class="cx"> 
</span><span class="cx"> var categorizedQueuesByPlatformAndBuildType = {};
</span><ins>+var platformsByFamily = {};
</ins><span class="cx"> 
</span><span class="cx"> for (var i = 0; i &lt; buildbots.length; ++i) {
</span><span class="cx">     var buildbot = buildbots[i];
</span><span class="lines">@@ -103,27 +104,63 @@
</span><span class="cx"> testNames[Buildbot.TestCategory.WebKit2] = &quot;WK2 Tests&quot;;
</span><span class="cx"> testNames[Buildbot.TestCategory.WebKit1] = &quot;WK1 Tests&quot;;
</span><span class="cx"> 
</span><ins>+function parsePlatformFamily(platformName)
+{
+    if (platformName)
+        return platformName.substr(0, platformName.indexOf(&quot;-&quot;));
+    return ''
+}
+
+function initPlatformsByFamily()
+{
+    var platforms = Dashboard.sortedPlatforms;
+    for (var i in platforms) {
+        // Make sure the platform will be displayed on the page before considering its platform family.
+        if (!categorizedQueuesByPlatformAndBuildType[platforms[i].name])
+            continue;
+
+        var platformFamily = parsePlatformFamily(platforms[i].name);
+        if (platformsByFamily[platformFamily])
+            platformsByFamily[platformFamily].push(platforms[i].name)
+        else
+            platformsByFamily[platformFamily] = [platforms[i].name]
+    }
+}
+
+function updateToggleButtons()
+{
+    var hiddenPlatformFamilies = settings.getObject(&quot;hiddenPlatformFamilies&quot;) || [];
+    var hiddenFamilyButtons = {&quot;all&quot;: hiddenPlatformFamilies.length &gt; 0};
+    for (var i = 0; i &lt; hiddenPlatformFamilies.length; ++i)
+        hiddenFamilyButtons[hiddenPlatformFamilies[i]] = true;
+
+    var platformFamilyButtons = document.getElementsByClassName(&quot;platformFamilyToggleButton&quot;);
+    for (var i = 0; i &lt; platformFamilyButtons.length; ++i) {
+        var hiddenPlatformFamily = parsePlatformFamily(platformFamilyButtons[i].id);
+        if (!hiddenFamilyButtons[hiddenPlatformFamily])
+            platformFamilyButtons[i].classList.add(&quot;familyShown&quot;);
+        else
+            platformFamilyButtons[i].classList.remove(&quot;familyShown&quot;);
+    }
+}
+
</ins><span class="cx"> function updateHiddenPlatforms()
</span><span class="cx"> {
</span><del>-    var hiddenPlatforms = settings.getObject(&quot;hiddenPlatforms&quot;);
-    if (!hiddenPlatforms)
-        hiddenPlatforms = [];
-
</del><ins>+    var hiddenPlatformFamilies = settings.getObject(&quot;hiddenPlatformFamilies&quot;) || [];
</ins><span class="cx">     var platformRows = document.querySelectorAll(&quot;tr.platform&quot;);
</span><span class="cx">     for (var i = 0; i &lt; platformRows.length; ++i)
</span><span class="cx">         platformRows[i].classList.remove(&quot;hidden&quot;);
</span><span class="cx"> 
</span><del>-    for (var i = 0; i &lt; hiddenPlatforms.length; ++i) {
-        var platformRow = document.querySelector(&quot;tr.platform.&quot; + hiddenPlatforms[i]);
-        if (platformRow)
-            platformRow.classList.add(&quot;hidden&quot;);
</del><ins>+    for (var i = 0; i &lt; hiddenPlatformFamilies.length; ++i) {
+        var platformFamily = hiddenPlatformFamilies[i];
+        for (var j = 0; j &lt; platformsByFamily[platformFamily].length; ++j) {
+            var name = platformsByFamily[platformFamily][j];
+            var platformRow = document.querySelector(&quot;tr.platform.&quot; + name);
+            if (platformRow)
+                platformRow.classList.add(&quot;hidden&quot;);
+        }
</ins><span class="cx">     }
</span><del>-
-    var unhideButton = document.querySelector(&quot;div.cellButton.unhide&quot;);
-    if (hiddenPlatforms.length)
-        unhideButton.classList.remove(&quot;hidden&quot;);
-    else
-        unhideButton.classList.add(&quot;hidden&quot;);
</del><ins>+    updateToggleButtons();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function applyAccessibilityColorSetting()
</span><span class="lines">@@ -161,12 +198,6 @@
</span><span class="cx">     row.classList.add(&quot;headers&quot;);
</span><span class="cx"> 
</span><span class="cx">     var header = document.createElement(&quot;th&quot;); 
</span><del>-    var unhideButton = document.createElement(&quot;div&quot;);
-    unhideButton.addEventListener(&quot;click&quot;, function () { settings.clearHiddenPlatforms(); });
-    unhideButton.textContent = &quot;Show All Platforms&quot;;
-    unhideButton.classList.add(&quot;cellButton&quot;, &quot;unhide&quot;, &quot;hidden&quot;);
-
-    header.appendChild(unhideButton);
</del><span class="cx">     row.appendChild(header);
</span><span class="cx"> 
</span><span class="cx">     header = document.createElement(&quot;th&quot;);
</span><span class="lines">@@ -209,16 +240,9 @@
</span><span class="cx">         ringImage.title = platform.readableName;
</span><span class="cx">         cell.appendChild(ringImage);
</span><span class="cx"> 
</span><del>-        var hideButton = document.createElement(&quot;div&quot;);
-        hideButton.addEventListener(&quot;click&quot;, function (platformName) { return function () { settings.toggleHiddenPlatform(platformName); }; }(platform.name) );
-        hideButton.textContent = &quot;hide&quot;;
-        hideButton.classList.add(&quot;cellButton&quot;, &quot;hide&quot;);
-        cell.appendChild(hideButton);
-
</del><span class="cx">         row.appendChild(cell);
</span><span class="cx"> 
</span><span class="cx">         cell = document.createElement(&quot;td&quot;);
</span><del>-
</del><span class="cx">         var view = new BuildbotBuilderQueueView(platformQueues.builders);
</span><span class="cx">         cell.appendChild(view.element);
</span><span class="cx">         row.appendChild(cell);
</span><span class="lines">@@ -283,16 +307,43 @@
</span><span class="cx">         settingsButton.classList.add(&quot;settings&quot;);
</span><span class="cx">         document.body.appendChild(settingsButton);
</span><span class="cx"> 
</span><ins>+        var settingsWrapper = document.createElement(&quot;div&quot;);
+        settingsWrapper.classList.add(&quot;unhide&quot;, &quot;hidden&quot;, &quot;settingsWrapper&quot;)
+
+        var platformFamilyToggleWrapper = document.createElement(&quot;div&quot;);
+        platformFamilyToggleWrapper.classList.add(&quot;unhide&quot;, &quot;hidden&quot;, &quot;familyToggleWrapper&quot;);
+
+        var unhideAllButton = document.createElement(&quot;div&quot;);
+        unhideAllButton.addEventListener(&quot;click&quot;, function () { settings.clearHiddenPlatformFamilies(); });
+        unhideAllButton.classList.add(&quot;unhide&quot;, &quot;hidden&quot;, &quot;platformFamilyToggleButton&quot;);
+        unhideAllButton.setAttribute(&quot;id&quot;, &quot;all-platformFamilyToggleButton&quot;);
+        unhideAllButton.textContent = &quot;all&quot;;
+        platformFamilyToggleWrapper.appendChild(unhideAllButton);
+
+        initPlatformsByFamily();
+        for (var platformFamily in platformsByFamily) {
+            var platformFamilyToggle = document.createElement(&quot;div&quot;);
+            platformFamilyToggle.addEventListener(&quot;click&quot;, function () {
+                settings.toggleHiddenPlatformFamily(this.toString());
+            }.bind(platformFamily));
+            platformFamilyToggle.classList.add(&quot;unhide&quot;, &quot;hidden&quot;, &quot;platformFamilyToggleButton&quot;);
+            platformFamilyToggle.setAttribute(&quot;id&quot;, platformFamily + &quot;-platformFamilyToggleButton&quot;);
+            platformFamilyToggle.textContent = platformFamily;
+            platformFamilyToggleWrapper.appendChild(platformFamilyToggle);
+        }
+        settingsWrapper.appendChild(platformFamilyToggleWrapper);
+
</ins><span class="cx">         var toggleAccessibilityColorButton = document.createElement(&quot;div&quot;);
</span><span class="cx">         toggleAccessibilityColorButton.addEventListener(&quot;click&quot;, function() { toggleAccessibilityColors(); });
</span><del>-        toggleAccessibilityColorButton.setAttribute(&quot;class&quot;, &quot;unhide hidden accessibilityButton&quot;);
</del><ins>+        toggleAccessibilityColorButton.classList.add(&quot;unhide&quot;, &quot;hidden&quot;, &quot;accessibilityButton&quot;);
</ins><span class="cx">         toggleAccessibilityColorButton.setAttribute(&quot;id&quot;, &quot;accessibilityButton&quot;);
</span><span class="cx">         toggleAccessibilityColorButton.textContent = &quot;enable accessibility colors&quot;;
</span><del>-        document.body.appendChild(toggleAccessibilityColorButton);
</del><ins>+        settingsWrapper.appendChild(toggleAccessibilityColorButton);
+        document.body.appendChild(settingsWrapper);
</ins><span class="cx">         applyAccessibilityColorSetting();
</span><del>-        
</del><ins>+
</ins><span class="cx">         updateHiddenPlatforms();
</span><del>-        settings.addSettingListener(&quot;hiddenPlatforms&quot;, updateHiddenPlatforms);
</del><ins>+        settings.addSettingListener(&quot;hiddenPlatformFamilies&quot;, updateHiddenPlatforms);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsMetricsMainjs"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsMain.js (189924 => 189925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsMain.js        2015-09-17 19:29:38 UTC (rev 189924)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsMain.js        2015-09-17 19:42:37 UTC (rev 189925)
</span><span class="lines">@@ -70,42 +70,15 @@
</span><span class="cx"> testNames[Buildbot.TestCategory.WebKit2] = &quot;WK2 Tests&quot;;
</span><span class="cx"> testNames[Buildbot.TestCategory.WebKit1] = &quot;WK1 Tests&quot;;
</span><span class="cx"> 
</span><del>-function updateHiddenPlatforms()
-{
-    var hiddenPlatforms = settings.getObject(&quot;hiddenPlatforms&quot;);
-    if (!hiddenPlatforms)
-        hiddenPlatforms = [];
-
-    var platformRows = document.querySelectorAll(&quot;tr.platform&quot;);
-    for (var i = 0; i &lt; platformRows.length; ++i)
-        platformRows[i].classList.remove(&quot;hidden&quot;);
-
-    for (var i = 0; i &lt; hiddenPlatforms.length; ++i) {
-        var platformRow = document.querySelector(&quot;tr.platform.&quot; + hiddenPlatforms[i]);
-        if (platformRow)
-            platformRow.classList.add(&quot;hidden&quot;);
-    }
-
-    var unhideButton = document.querySelector(&quot;div.cellButton.unhide&quot;);
-    if (hiddenPlatforms.length)
-        unhideButton.classList.remove(&quot;hidden&quot;);
-    else
-        unhideButton.classList.add(&quot;hidden&quot;);
-}
-
</del><span class="cx"> function unhiddenQueues()
</span><span class="cx"> {
</span><del>-    var hiddenPlatforms = settings.getObject(&quot;hiddenPlatforms&quot;);
-    if (!hiddenPlatforms)
-        hiddenPlatforms = [];
-
</del><ins>+    var hiddenPlatformFamilies = settings.getObject(&quot;hiddenPlatformFamilies&quot;) || [];
</ins><span class="cx">     var result = [];
</span><del>-
</del><span class="cx">     for (var i = 0; i &lt; buildbots.length; ++i) {
</span><span class="cx">         var buildbot = buildbots[i];
</span><span class="cx">         for (var id in buildbot.queues) {
</span><span class="cx">             var queue = buildbot.queues[id];
</span><del>-            if (-1 === hiddenPlatforms.indexOf(queue.platform))
</del><ins>+            if (-1 === hiddenPlatformFamilies.indexOf(parsePlatformFamily(queue.platform)))
</ins><span class="cx">                 result.push(queue);
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -171,11 +144,6 @@
</span><span class="cx">     row.classList.add(&quot;headers&quot;);
</span><span class="cx"> 
</span><span class="cx">     var header = document.createElement(&quot;th&quot;);
</span><del>-    var unhideButton = document.createElement(&quot;div&quot;);
-    unhideButton.addEventListener(&quot;click&quot;, function () { settings.clearHiddenPlatforms(); });
-    unhideButton.textContent = &quot;Show All Platforms&quot;;
-    unhideButton.classList.add(&quot;cellButton&quot;, &quot;unhide&quot;, &quot;hidden&quot;);
-    header.appendChild(unhideButton);
</del><span class="cx">     row.appendChild(header);
</span><span class="cx"> 
</span><span class="cx">     header = document.createElement(&quot;th&quot;);
</span><span class="lines">@@ -214,12 +182,6 @@
</span><span class="cx">         logoImage.classList.add(&quot;logo&quot;);
</span><span class="cx">         cell.appendChild(logoImage);
</span><span class="cx"> 
</span><del>-        var hideButton = document.createElement(&quot;div&quot;);
-        hideButton.addEventListener(&quot;click&quot;, function (platformName) { return function () { settings.toggleHiddenPlatform(platformName); }; }(platform.name) );
-        hideButton.textContent = &quot;hide&quot;;
-        hideButton.classList.add(&quot;cellButton&quot;, &quot;hide&quot;);
-        cell.appendChild(hideButton);
-
</del><span class="cx">         row.appendChild(cell);
</span><span class="cx"> 
</span><span class="cx">         cell = document.createElement(&quot;td&quot;);
</span><span class="lines">@@ -344,7 +306,7 @@
</span><span class="cx">         document.body.appendChild(settingsButton);
</span><span class="cx"> 
</span><span class="cx">         updateHiddenPlatforms();
</span><del>-        settings.addSettingListener(&quot;hiddenPlatforms&quot;, updateHiddenPlatforms);
</del><ins>+        settings.addSettingListener(&quot;hiddenPlatformFamilies&quot;, updateHiddenPlatforms);
</ins><span class="cx">         settings.addSettingListener(&quot;enteredSettings&quot;, function() { 
</span><span class="cx">             $('html, body').stop().animate({
</span><span class="cx">                 scrollTop: $(&quot;#metrics-queues-table&quot;).offset().top
</span></span></pre></div>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsQueueViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/QueueView.js (189924 => 189925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/QueueView.js        2015-09-17 19:29:38 UTC (rev 189924)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/QueueView.js        2015-09-17 19:42:37 UTC (rev 189925)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> 
</span><span class="cx">     this.updateTimer = null;
</span><span class="cx">     setTimeout(this._updateHiddenState.bind(this), 0); // Lets subclass constructor finish before calling _updateHiddenState.
</span><del>-    settings.addSettingListener(&quot;hiddenPlatforms&quot;, this._updateHiddenState.bind(this));
</del><ins>+    settings.addSettingListener(&quot;hiddenPlatformFamilies&quot;, this._updateHiddenState.bind(this));
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> BaseObject.addConstructorFunctions(QueueView);
</span><span class="lines">@@ -67,9 +67,9 @@
</span><span class="cx">         if (!settings.available())
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        var hiddenPlatforms = settings.getObject(&quot;hiddenPlatforms&quot;);
</del><ins>+        var hiddenPlatformFamilies = settings.getObject(&quot;hiddenPlatformFamilies&quot;);
</ins><span class="cx">         var wasHidden = !this.updateTimer;
</span><del>-        var isHidden = hiddenPlatforms &amp;&amp; hiddenPlatforms.contains(this.platform);
</del><ins>+        var isHidden = hiddenPlatformFamilies &amp;&amp; hiddenPlatformFamilies.contains(parsePlatformFamily(this.platform));
</ins><span class="cx"> 
</span><span class="cx">         if (wasHidden &amp;&amp; !isHidden) {
</span><span class="cx">             this._updateQueues();
</span></span></pre></div>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsSettingsjs"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Settings.js (189924 => 189925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Settings.js        2015-09-17 19:29:38 UTC (rev 189924)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Settings.js        2015-09-17 19:42:37 UTC (rev 189925)
</span><span class="lines">@@ -84,25 +84,22 @@
</span><span class="cx">         document.body.classList.toggle(&quot;settings-visible&quot;);
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    toggleHiddenPlatform: function(platform)
</del><ins>+    toggleHiddenPlatformFamily: function(platformFamily)
</ins><span class="cx">     {
</span><del>-        var hiddenPlatforms = this.getObject(&quot;hiddenPlatforms&quot;);
-        if (!hiddenPlatforms)
-            hiddenPlatforms = [];
-
-        var hiddenPlatformIndex = hiddenPlatforms.indexOf(platform);
</del><ins>+        var hiddenPlatformFamilies = this.getObject(&quot;hiddenPlatformFamilies&quot;) || [];
+        var hiddenPlatformIndex = hiddenPlatformFamilies.indexOf(platformFamily);
</ins><span class="cx">         if (hiddenPlatformIndex &gt; -1)
</span><del>-            hiddenPlatforms.splice(hiddenPlatformIndex, 1);
</del><ins>+            hiddenPlatformFamilies.splice(hiddenPlatformIndex, 1);
</ins><span class="cx">         else
</span><del>-            hiddenPlatforms.push(platform);
</del><ins>+            hiddenPlatformFamilies.push(platformFamily);
</ins><span class="cx"> 
</span><del>-        this.setObject(&quot;hiddenPlatforms&quot;, hiddenPlatforms);
-        this.fireSettingListener(&quot;hiddenPlatforms&quot;);
</del><ins>+        this.setObject(&quot;hiddenPlatformFamilies&quot;, hiddenPlatformFamilies);
+        this.fireSettingListener(&quot;hiddenPlatformFamilies&quot;);
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    clearHiddenPlatforms: function()
</del><ins>+    clearHiddenPlatformFamilies: function()
</ins><span class="cx">     {
</span><del>-        this.setObject(&quot;hiddenPlatforms&quot;, []);
-        this.fireSettingListener(&quot;hiddenPlatforms&quot;);
</del><ins>+        this.setObject(&quot;hiddenPlatformFamilies&quot;, []);
+        this.fireSettingListener(&quot;hiddenPlatformFamilies&quot;);
</ins><span class="cx">     },
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardStylesMaincss"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css (189924 => 189925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css        2015-09-17 19:29:38 UTC (rev 189924)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css        2015-09-17 19:42:37 UTC (rev 189925)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">     text-decoration: underline;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-div.cellButton, div.accessibilityButton {
</del><ins>+div.cellButton, div.accessibilityButton, div.platformFamilyToggleButton {
</ins><span class="cx">     font-family: &quot;HelveticaNeue-Light&quot;, sans-serif;
</span><span class="cx">     font-size: 12px;
</span><span class="cx">     color: rgb(185, 175, 125);
</span><span class="lines">@@ -56,12 +56,14 @@
</span><span class="cx">     right: 4px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-div.cellButton.unhide, div.accessibilityButton.unhide {
</del><ins>+div.cellButton.unhide, div.accessibilityButton.unhide, div.platformFamilyToggleButton.unhide {
</ins><span class="cx">     display: none;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .settings-visible div.cellButton.hide, .settings-visible div.cellButton.unhide,
</span><del>-.settings-visible div.accessibilityButton.hide, .settings-visible div.accessibilityButton.unhide {
</del><ins>+.settings-visible div.accessibilityButton.hide, .settings-visible div.accessibilityButton.unhide,
+.settings-visible div.platformFamilyToggleButton.hide, .settings-visible div.platformFamilyToggleButton.unhide,
+.settings-visible div.settingsWrapper.hide, .settings-visible div.settingsWrapper {
</ins><span class="cx">     display: block;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -206,8 +208,45 @@
</span><span class="cx">     text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.2)
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.accessibilityButton {
-    position: absolute;
-    left: 45px;
</del><ins>+div.settingsWrapper.hide {
+    display: none;
+}
+
+div.settingsWrapper {
+    position: fixed;
+    width: 100%;
+    height: 45px;
+    top: 0px;
+    left: 50px;
+    background-color: rgb(233, 231, 223);
+    z-index: 2;
+}
+
+div.familyToggleWrapper {
+    position: inherit;
+    display: block;
+    left: 50px;
</ins><span class="cx">     top: 13.5px;
</span><span class="cx"> }
</span><ins>+
+div.platformFamilyToggleButton {
+    float: left;
+    padding-left: 5px;
+    padding-right: 5px;
+    text-decoration: line-through;
+}
+
+div.platformFamilyToggleButton:not(:last-child) {
+    border-right: 1px solid rgb(211, 207, 191);
+}
+
+div.familyShown {
+    text-decoration: none;
+    font-weight: bold;
+}
+
+div.accessibilityButton {
+    position: inherit;
+    top: 13.5px;
+    right: 8.5px;
+}
</ins></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (189924 => 189925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-09-17 19:29:38 UTC (rev 189924)
+++ trunk/Tools/ChangeLog        2015-09-17 19:42:37 UTC (rev 189925)
</span><span class="lines">@@ -1,3 +1,54 @@
</span><ins>+2015-09-17  Dean Johnson  &lt;dean_johnson@apple.com&gt;
+
+        Added toggle options for hiding and showing certain platform families on the dashboard.
+        https://bugs.webkit.org/show_bug.cgi?id=148403
+
+        Reviewed by David Kilzer.
+
+        This patch removes &quot;hiddenPlatforms&quot; from use in the code and local storage. We also removed
+        individual hide/show buttons for platforms because we've added toggle options to hide/show entire
+        families. Examples of these are &quot;mac&quot;, &quot;ios&quot;, and &quot;linux&quot;. &quot;Show All Platforms&quot; was also removed
+        in lieu of an &quot;all&quot; button in the toggle menu.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js:
+        (parsePlatformFamily): Helper function to parse out a platform family.
+        (initPlatformsByFamily): Initializes platformsByFamily, which organizes platforms on the
+        page by platformsByFamily[&lt;family&gt;] = &lt;list of platforms belonging to that family&gt;.
+        (updateToggleButtons): Updates the status of the toggle buttons.
+        (updateHiddenPlatforms): Changed to work with the new implementation of hiding/showing platforms.
+        (documentReady): Added creation of toggle buttons.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsMain.js:
+        (unhiddenQueues): Updated to search by platform family instead of the individual platform name.
+        (documentReady): Changed hiddenPlatforms =&gt; hiddenPlatformFamilies.
+        (updateHiddenPlatforms): Deleted. After removing the individual hide button code, 
+        this did the exact same thing as the updateHiddenPlatforms in Scripts/Main.js so it was removed.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/QueueView.js:
+        (QueueView): Updated to use hiddenPlatformFamilies.
+        (QueueView.prototype._updateHiddenState): Updated to use hiddenPlatformFamilies.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Settings.js:
+        (Settings.prototype.toggleHiddenPlatformFamily): Renamed function and some variables.
+        (Settings.prototype.clearHiddenPlatformFamilies): Now uses hiddenPlatformFamilies for events.
+        (Settings.prototype.toggleHiddenPlatform): Deleted.
+        (Settings.prototype.clearHiddenPlatforms): Deleted.
+        (Settings.prototype.toggleShowPlatformFamily): Deleted.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
+        (div.cellButton, div.accessibilityButton, div.platformFamilyToggleButton):
+        (div.cellButton.unhide, div.accessibilityButton.unhide, div.platformFamilyToggleButton.unhide):
+        (.settings-visible div.settingsWrapper.hide, .settings-visible div.settingsWrapper):
+        (table.queue-grid tr.headers th):
+        (div.settingsWrapper.hide):
+        (div.settingsWrapper):
+        (div.familyToggleWrapper):
+        (div.platformFamilyToggleButton):
+        (div.platformFamilyShowToggleButton:not(:last-child)):
+        (div.familyShown):
+        (div.accessibilityButton):
+        (div.cellButton, div.accessibilityButton): Added platformFamilyToggleButton class.
+        (div.cellButton.unhide, div.accessibilityButton.unhide): Added platformFamilyToggleButton class.
+        (.settings-visible div.accessibilityButton.hide, .settings-visible div.accessibilityButton.unhide): Added
+        platformFamilyToggleButton and settingsWrapper class.
+        (.accessibilityButton): Deleted.
+
</ins><span class="cx"> 2015-09-17  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add a test ensuring that scrolling in the middle of a page can't start a swipe gesture
</span></span></pre>
</div>
</div>

</body>
</html>