mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout 16a8b66f1503 (bug 758950) for M1 failures in test_bug292789.html
This commit is contained in:
parent
5743455ff8
commit
7d2d55ecc3
@ -1023,11 +1023,11 @@ var AddonRepository = {
|
||||
break;
|
||||
case "authors":
|
||||
let authorNodes = node.getElementsByTagName("author");
|
||||
for (let authorNode of authorNodes) {
|
||||
let name = self._getDescendantTextContent(authorNode, "name");
|
||||
let link = self._getDescendantTextContent(authorNode, "link");
|
||||
Array.forEach(authorNodes, function(aAuthorNode) {
|
||||
let name = self._getDescendantTextContent(aAuthorNode, "name");
|
||||
let link = self._getDescendantTextContent(aAuthorNode, "link");
|
||||
if (name == null || link == null)
|
||||
continue;
|
||||
return;
|
||||
|
||||
let author = new AddonManagerPrivate.AddonAuthor(name, link);
|
||||
if (addon.creator == null)
|
||||
@ -1038,27 +1038,27 @@ var AddonRepository = {
|
||||
|
||||
addon.developers.push(author);
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "previews":
|
||||
let previewNodes = node.getElementsByTagName("preview");
|
||||
for (let previewNode of previewNodes) {
|
||||
let full = self._getUniqueDescendant(previewNode, "full");
|
||||
Array.forEach(previewNodes, function(aPreviewNode) {
|
||||
let full = self._getUniqueDescendant(aPreviewNode, "full");
|
||||
if (full == null)
|
||||
continue;
|
||||
return;
|
||||
|
||||
let fullURL = self._getTextContent(full);
|
||||
let fullWidth = full.getAttribute("width");
|
||||
let fullHeight = full.getAttribute("height");
|
||||
|
||||
let thumbnailURL, thumbnailWidth, thumbnailHeight;
|
||||
let thumbnail = self._getUniqueDescendant(previewNode, "thumbnail");
|
||||
let thumbnail = self._getUniqueDescendant(aPreviewNode, "thumbnail");
|
||||
if (thumbnail) {
|
||||
thumbnailURL = self._getTextContent(thumbnail);
|
||||
thumbnailWidth = thumbnail.getAttribute("width");
|
||||
thumbnailHeight = thumbnail.getAttribute("height");
|
||||
}
|
||||
let caption = self._getDescendantTextContent(previewNode, "caption");
|
||||
let caption = self._getDescendantTextContent(aPreviewNode, "caption");
|
||||
let screenshot = new AddonManagerPrivate.AddonScreenshot(fullURL, fullWidth, fullHeight,
|
||||
thumbnailURL, thumbnailWidth,
|
||||
thumbnailHeight, caption);
|
||||
@ -1066,11 +1066,11 @@ var AddonRepository = {
|
||||
if (addon.screenshots == null)
|
||||
addon.screenshots = [];
|
||||
|
||||
if (previewNode.getAttribute("primary") == 1)
|
||||
if (aPreviewNode.getAttribute("primary") == 1)
|
||||
addon.screenshots.unshift(screenshot);
|
||||
else
|
||||
addon.screenshots.push(screenshot);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "learnmore":
|
||||
addon.homepageURL = addon.homepageURL || this._getTextContent(node);
|
||||
|
@ -2422,7 +2422,8 @@ var gListView = {
|
||||
return;
|
||||
|
||||
let prop = aIsInstall ? "mInstall" : "mAddon";
|
||||
for (let item of this._listBox.childNodes) {
|
||||
for (let i = 0; i < this._listBox.itemCount; i++) {
|
||||
let item = this._listBox.childNodes[i];
|
||||
if (item[prop] == aObj)
|
||||
return;
|
||||
}
|
||||
@ -2435,7 +2436,8 @@ var gListView = {
|
||||
removeItem: function gListView_removeItem(aObj, aIsInstall) {
|
||||
let prop = aIsInstall ? "mInstall" : "mAddon";
|
||||
|
||||
for (let item of this._listBox.childNodes) {
|
||||
for (let i = 0; i < this._listBox.itemCount; i++) {
|
||||
let item = this._listBox.childNodes[i];
|
||||
if (item[prop] == aObj) {
|
||||
this._listBox.removeChild(item);
|
||||
this.showEmptyNotice(this._listBox.itemCount == 0);
|
||||
@ -2651,13 +2653,12 @@ var gDetailView = {
|
||||
!gViewController.commands.cmd_showItemPreferences.isEnabled(aAddon);
|
||||
|
||||
var gridRows = document.querySelectorAll("#detail-grid rows row");
|
||||
let first = true;
|
||||
for (let gridRow of gridRows) {
|
||||
if (first && window.getComputedStyle(gridRow, null).getPropertyValue("display") != "none") {
|
||||
gridRow.setAttribute("first-row", true);
|
||||
for (var i = 0, first = true; i < gridRows.length; ++i) {
|
||||
if (first && window.getComputedStyle(gridRows[i], null).getPropertyValue("display") != "none") {
|
||||
gridRows[i].setAttribute("first-row", true);
|
||||
first = false;
|
||||
} else {
|
||||
gridRow.removeAttribute("first-row");
|
||||
gridRows[i].removeAttribute("first-row");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,25 +30,25 @@ XPInstallConfirm.init = function ()
|
||||
var itemList = document.getElementById("itemList");
|
||||
|
||||
var numItemsToInstall = args.installs.length;
|
||||
for (let install of args.installs) {
|
||||
for (var i = 0; i < numItemsToInstall; ++i) {
|
||||
var installItem = document.createElement("installitem");
|
||||
itemList.appendChild(installItem);
|
||||
|
||||
installItem.name = install.addon.name;
|
||||
installItem.url = install.sourceURI.spec;
|
||||
var icon = install.iconURL;
|
||||
installItem.name = args.installs[i].addon.name;
|
||||
installItem.url = args.installs[i].sourceURI.spec;
|
||||
var icon = args.installs[i].iconURL;
|
||||
if (icon)
|
||||
installItem.icon = icon;
|
||||
var type = install.type;
|
||||
var type = args.installs[i].type;
|
||||
if (type)
|
||||
installItem.type = type;
|
||||
if (install.certName) {
|
||||
installItem.cert = bundle.getFormattedString("signed", [install.certName]);
|
||||
if (args.installs[i].certName) {
|
||||
installItem.cert = bundle.getFormattedString("signed", [args.installs[i].certName]);
|
||||
}
|
||||
else {
|
||||
installItem.cert = bundle.getString("unverified");
|
||||
}
|
||||
installItem.signed = install.certName ? "true" : "false";
|
||||
installItem.signed = args.installs[i].certName ? "true" : "false";
|
||||
}
|
||||
|
||||
var introString = bundle.getString("itemWarnIntroSingle");
|
||||
|
@ -17,7 +17,7 @@
|
||||
ondialogaccept="return XPInstallConfirm.onOK();"
|
||||
ondialogcancel="return XPInstallConfirm.onCancel();">
|
||||
|
||||
<script src="chrome://mozapps/content/xpinstall/xpinstallConfirm.js" type="application/javascript"/>
|
||||
<script src="chrome://mozapps/content/xpinstall/xpinstallConfirm.js"/>
|
||||
|
||||
<stringbundle id="xpinstallConfirmStrings"
|
||||
src="chrome://mozapps/locale/xpinstall/xpinstallConfirm.properties"/>
|
||||
|
@ -163,8 +163,8 @@ function wait_for_page(aWindow, aPageId, aCallback) {
|
||||
|
||||
function get_list_names(aList) {
|
||||
var items = [];
|
||||
for (let listItem of aList.childNodes)
|
||||
items.push(listItem.label);
|
||||
for (let i = 0; i < aList.childNodes.length; i++)
|
||||
items.push(aList.childNodes[i].label);
|
||||
items.sort();
|
||||
return items;
|
||||
}
|
||||
@ -219,16 +219,16 @@ add_test(function() {
|
||||
"Next button should be enabled");
|
||||
|
||||
// Uncheck all
|
||||
for (let listItem of list.childNodes)
|
||||
EventUtils.synthesizeMouse(listItem, 2, 2, { }, aWindow);
|
||||
for (let i = 0; i < list.childNodes.length; i++)
|
||||
EventUtils.synthesizeMouse(list.childNodes[i], 2, 2, { }, aWindow);
|
||||
|
||||
ok(doc.documentElement.getButton("next").disabled,
|
||||
"Next button should not be enabled");
|
||||
|
||||
// Check the ones we want to install
|
||||
for (let listItem of list.childNodes) {
|
||||
if (listItem.label != "Addon7 2.0")
|
||||
EventUtils.synthesizeMouse(listItem, 2, 2, { }, aWindow);
|
||||
for (let i = 0; i < list.childNodes.length; i++) {
|
||||
if (list.childNodes[i].label != "Addon7 2.0")
|
||||
EventUtils.synthesizeMouse(list.childNodes[i], 2, 2, { }, aWindow);
|
||||
}
|
||||
|
||||
var button = doc.documentElement.getButton("next");
|
||||
@ -313,9 +313,9 @@ add_test(function() {
|
||||
is(items[2], "Addon9 2.0", "Should have seen update for addon9");
|
||||
|
||||
// Unheck the ones we don't want to install
|
||||
for (let listItem of list.childNodes) {
|
||||
if (listItem.label != "Addon7 2.0")
|
||||
EventUtils.synthesizeMouse(listItem, 2, 2, { }, aWindow);
|
||||
for (let i = 0; i < list.childNodes.length; i++) {
|
||||
if (list.childNodes[i].label != "Addon7 2.0")
|
||||
EventUtils.synthesizeMouse(list.childNodes[i], 2, 2, { }, aWindow);
|
||||
}
|
||||
|
||||
var button = doc.documentElement.getButton("next");
|
||||
|
@ -1159,9 +1159,9 @@ if ("nsIWindowsRegKey" in AM_Ci) {
|
||||
},
|
||||
|
||||
readStringValue: function(aName) {
|
||||
for (let value of this.values) {
|
||||
if (value.name == aName)
|
||||
return value.value;
|
||||
for (let i = 0; i < this.values.length; i++) {
|
||||
if (this.values[i].name == aName)
|
||||
return this.values[i].value;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user