Commit 9eaaf8d9 authored by Philipp Hancke's avatar Philipp Hancke Committed by Commit Bot

webrtc-internals: only highlight currently active connection

and remove the class from any past ones.

BUG=678292

Change-Id: I5a3bc354f45363573ed8604fbbc27ee2530faa66
Reviewed-on: https://chromium-review.googlesource.com/615500Reviewed-by: default avatarTommi <tommi@chromium.org>
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543371}
parent 3373f61a
......@@ -133,6 +133,7 @@ var StatsTable = (function(ssrcInfoManager) {
updateStatsTableRow_: function(statsTable, rowName, value) {
var trId = statsTable.id + '-' + rowName;
var trElement = $(trId);
var activeConnectionClass = 'stats-table-active-connection';
if (!trElement) {
trElement = document.createElement('tr');
trElement.id = trId;
......@@ -142,8 +143,13 @@ var StatsTable = (function(ssrcInfoManager) {
trElement.cells[1].textContent = value;
// Highlights the table for the active connection.
if (rowName == 'googActiveConnection' && value == true)
statsTable.parentElement.classList.add('stats-table-active-connection');
if (rowName == 'googActiveConnection') {
if (value === 'true')
statsTable.parentElement.classList.add(activeConnectionClass);
} else {
statsTable.parentElement.classList.remove(activeConnectionClass);
}
}
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment