Bug 1546338 - fix some more instances of Port [Bug 1551320 - In XUL documents replace all callers of createElement with createXULElement]. r=jorgk

This commit is contained in:
Magnus Melin 2019-05-19 16:26:42 +03:00
Родитель 947d80f302
Коммит b5f088faa4
9 изменённых файлов: 24 добавлений и 24 удалений

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

@ -293,12 +293,12 @@
let buddiesElt = document.getAnonymousElementByAttribute(this, "anonid",
"buddies");
let sep = document.createElement("separator");
let sep = document.createXULElement("separator");
sep.setAttribute("class", "groove tooltipSeparator");
buddiesElt.appendChild(sep);
for (let buddy of buddies) {
let buddyElt = document.createElement("buddy");
let buddyElt = document.createXULElement("buddy");
buddiesElt.appendChild(buddyElt);
buddyElt.getBoundingClientRect(); // force binding attachment
buddyElt.build(buddy, this);

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

@ -137,9 +137,9 @@ var OTRUI = {
}
OTRUI.removeBuddyContextMenu(doc);
let sep = doc.createElement("menuseparator");
let sep = doc.createXULElement("menuseparator");
sep.setAttribute("id", "otrsep");
let menuitem = doc.createElement("menuitem");
let menuitem = doc.createXULElement("menuitem");
menuitem.setAttribute("label", _("buddycontextmenu.label"));
menuitem.setAttribute("id", "otrcont");
menuitem.addEventListener("command", () => {
@ -483,7 +483,7 @@ var OTRUI = {
let close = notification.querySelector("toolbarbutton");
close.setAttribute("oncommand", "this.parentNode.parentNode.dismiss();");
let top = this.globalDoc.createElement("hbox");
let top = this.globalDoc.createXULElement("hbox");
top.setAttribute("flex", "1");
top.setAttribute("align", "center");
top.classList.add("otr-notification-header");
@ -492,7 +492,7 @@ var OTRUI = {
top.appendChild(close);
notification.insertBefore(top, notification.messageDetails);
let bottom = this.globalDoc.createElement("hbox");
let bottom = this.globalDoc.createXULElement("hbox");
bottom.setAttribute("flex", "1");
bottom.setAttribute("oncommand", "this.parentNode._doButtonCommand(event);");
bottom.classList.add("otr-notification-footer");

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

@ -197,7 +197,7 @@ class Overlays {
if (this.document.readyState == "complete") {
let sheet;
let overlayTrigger = this.document.createElement("overlayTrigger");
let overlayTrigger = this.document.createXULElement("overlayTrigger");
overlayTrigger.addEventListener("bindingattached", () => {
oconsole.debug("XBL binding attached, continuing with load");
if (sheet) {

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

@ -56,7 +56,7 @@
if (undoCommand) {
if (!undoButton) {
undoButton = document.createElement("button");
undoButton = document.createXULElement("button");
undoButton.className = "button-link undo-btn";
undoButton.setAttribute(
"label", gStrings.mailExt.GetStringFromName("warnLegacyUndoButton")

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

@ -867,7 +867,7 @@ var TagFacetingFilter = {
// Keep in mind that the XBL does not get built for dynamically created
// elements such as these until they get displayed, which definitely
// means not before we append it into the tree.
let button = aDocument.createElement("toolbarbutton");
let button = aDocument.createXULElement("toolbarbutton");
button.setAttribute("id", "qfb-tag-" + tag.key);
button.addEventListener("command", commandHandler);

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

@ -1116,14 +1116,14 @@
this.trackNick(name);
let image = document.createElement("image");
let label = document.createElement("label");
let image = document.createXULElement("image");
let label = document.createXULElement("label");
label.setAttribute("value", name);
label.setAttribute("flex", "1");
label.setAttribute("crop", "end");
// Fix insertBuddy below if you change the DOM makeup!
var item = document.createElement("richlistitem");
var item = document.createXULElement("richlistitem");
item.chatBuddy = aBuddy;
item.appendChild(image);
item.appendChild(label);

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

@ -411,7 +411,7 @@
if ((!parent.isServer || showAccountsFileHere != "false") &&
(!mode || mode == "newFolder" || parent.noSelect ||
parent.canFileMessages || showAccountsFileHere == "true")) {
var menuitem = document.createElement("menuitem");
var menuitem = document.createXULElement("menuitem");
menuitem._folder = this._parentFolder;
menuitem.setAttribute("generated", "true");
if (this.hasAttribute("fileHereLabel")) {
@ -429,7 +429,7 @@
if (this._parentFolder.noSelect)
menuitem.setAttribute("disabled", "true");
let sep = document.createElement("menuseparator");
let sep = document.createXULElement("menuseparator");
sep.setAttribute("generated", "true");
this.appendChild(sep);
}
@ -451,7 +451,7 @@
}
if (addSeparator) {
// If we added Recent and/or Favorites, separate them from the rest of the items.
let sep = document.createElement("menuseparator");
let sep = document.createXULElement("menuseparator");
sep.setAttribute("generated", "true");
this.appendChild(sep);
}
@ -521,7 +521,7 @@
// If we're going to add subFolders, we need to make menus, not
// menuitems.
if (!folder.hasSubFolders || !shouldExpand(folder.server.type)) {
node = document.createElement("menuitem");
node = document.createXULElement("menuitem");
// Grumble, grumble, legacy code support
node.setAttribute("id", folder.URI);
node.setAttribute("class", "folderMenuItem menuitem-iconic");
@ -531,7 +531,7 @@
this._serversOnly = false;
// xxx this is slightly problematic in that we haven't confirmed
// whether any of the subfolders will pass the filter
node = document.createElement("menu");
node = document.createXULElement("menu");
node.setAttribute("class", "folderMenuItem menu-iconic");
node.setAttribute("generated", "true");
this.appendChild(node);
@ -563,12 +563,12 @@
// If there are labels, add the labels now
if (labels) {
var serverNode = document.createElement("menuitem");
var serverNode = document.createXULElement("menuitem");
serverNode.setAttribute("label", labels[folder.server.type]);
serverNode._folder = folder;
serverNode.setAttribute("generated", "true");
popup.appendChild(serverNode);
let sep = document.createElement("menuseparator");
let sep = document.createXULElement("menuseparator");
sep.setAttribute("generated", "true");
popup.appendChild(sep);
}
@ -603,7 +603,7 @@
<parameter name="type"/>
<body><![CDATA[
// Now create the Recent folder and its children
let menu = document.createElement("menu");
let menu = document.createXULElement("menu");
if (type == "recent") {
menu.setAttribute("label", this.getAttribute("recentLabel"));
menu.setAttribute("accesskey", this.getAttribute("recentAccessKey"));
@ -614,7 +614,7 @@
menu.setAttribute("special", type);
menu.setAttribute("generated", "true");
let popup = document.createElement("menupopup");
let popup = document.createXULElement("menupopup");
popup.setAttribute("class", this.getAttribute("class"));
popup.addEventListener("popupshowing",
() => this._buildSpecialSubmenu(menu),
@ -693,7 +693,7 @@
// Create entries for each of the recent folders.
for (let folderItem of specialFoldersMap) {
let node = document.createElement("menuitem");
let node = document.createXULElement("menuitem");
node.setAttribute("label", folderItem.label);
node._folder = folderItem.folder;

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

@ -558,7 +558,7 @@
<method name="addRow">
<body>
<![CDATA[
let listItem = document.createElement("richlistitem");
let listItem = document.createXULElement("richlistitem");
listItem.className = "ruleaction";
listItem.setAttribute("onfocus", "this.storeFocus();");
this.mListBox.insertBefore(listItem, this.nextSibling);

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

@ -32,7 +32,7 @@
.wrappedJSObject;
var result = glodaCompleter.curResult;
item = document.createElement("richlistitem", { is: result.getStyleAt(this._currentIndex) });
item = document.createXULElement("richlistitem", { is: result.getStyleAt(this._currentIndex) });
// set these attributes before we set the class
// so that we can use them from the constructor