Add gfxConfig to about:support. (bug 1254899 part 12, r=milan)

This commit is contained in:
David Anderson 2016-04-27 22:54:27 -07:00
Родитель aeb2cf5f44
Коммит 279c1e8703
4 изменённых файлов: 69 добавлений и 1 удалений

Просмотреть файл

@ -419,6 +419,44 @@ var snapshotFormatters = {
}
delete data.isGPU2Active;
let featureLog = data.featureLog;
delete data.featureLog;
let features = [];
for (let feature of featureLog.features) {
// Only add interesting decisions - ones that were not automatic based on
// all.js/gfxPrefs defaults.
if (feature.log.length > 1 || feature.log[0].status != "available") {
features.push(feature);
}
}
if (features.length) {
for (let feature of features) {
let trs = [];
for (let entry of feature.log) {
if (entry.type == "default" && entry.status == "available")
continue;
let text = entry.status + " by " + entry.type + ": " + entry.message;
trs.push($.new("tr", [
$.new("td", text),
]));
}
addRow("decisions", feature.name, [$.new("table", trs)]);
}
} else {
$("graphics-decisions-tbody").style.display = "none";
}
if (featureLog.fallbacks.length) {
for (let fallback of featureLog.fallbacks) {
addRow("workarounds", fallback.name, fallback.message);
}
} else {
$("graphics-workarounds-tbody").style.display = "none";
}
// Now that we're done, grab any remaining keys in data and drop them into
// the diagnostics section.
for (let key in data) {
@ -792,8 +830,18 @@ Serializer.prototype = {
if (children[0].classList.contains("title-column")) {
if (!this._isHiddenSubHeading(children[0]))
this._appendText(rowHeading);
} else if (children.length == 1) {
// This is a single-cell row.
this._appendText(rowHeading);
} else {
this._appendText(rowHeading + ": " + this._nodeText(children[1]).trim());
let childTables = trs[i].querySelectorAll("table");
if (childTables.length) {
// If we have child tables, don't use nodeText - its trs are already
// queued up from querySelectorAll earlier.
this._appendText(rowHeading + ": ");
} else {
this._appendText(rowHeading + ": " + this._nodeText(children[1]).trim());
}
}
this._startNewLine();
}

Просмотреть файл

@ -334,6 +334,22 @@
</tr>
</tbody>
<tbody id="graphics-decisions-tbody">
<tr>
<th colspan="2" class="title-column">
&aboutSupport.graphicsDecisionLogTitle;
</th>
</tr>
</tbody>
<tbody id="graphics-workarounds-tbody">
<tr>
<th colspan="2" class="title-column">
&aboutSupport.graphicsWorkaroundsTitle;
</th>
</tr>
</tbody>
<tbody id="graphics-failures-tbody">
<tr>
<th colspan="2" class="title-column">

Просмотреть файл

@ -114,3 +114,5 @@ variant of aboutSupport.showDir.label. -->
<!ENTITY aboutSupport.graphicsFailureLogTitle "Failure Log">
<!ENTITY aboutSupport.graphicsGPU1Title "GPU #1">
<!ENTITY aboutSupport.graphicsGPU2Title "GPU #2">
<!ENTITY aboutSupport.graphicsDecisionLogTitle "Decision Log">
<!ENTITY aboutSupport.graphicsWorkaroundsTitle "Workarounds">

Просмотреть файл

@ -474,6 +474,8 @@ var dataProviders = {
}
}
data.featureLog = gfxInfo.getFeatureLog();
completed();
},