Bug 1535725 - Replace use of boxObject in msgHdrView.js. r=alta88
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Sat, 25 May 2019 15:24:56 +0300
changeset 35714 bb64c0fb051bef86799f52ea8256432ce88c52aa
parent 35713 f5addc9ca311ff981e651dba9b1cf33752714145
child 35715 12e96412b2c899fce29e67e6c91bb75c1f12171a
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersalta88
bugs1535725
Bug 1535725 - Replace use of boxObject in msgHdrView.js. r=alta88
mail/base/content/msgHdrView.js
--- a/mail/base/content/msgHdrView.js
+++ b/mail/base/content/msgHdrView.js
@@ -2343,19 +2343,18 @@ function displayAttachmentsForExpandedVi
       attachmentitem.setAttribute("onmouseover",
                                   `MsgStatusFeedback.setOverLink("${displayUrl}")`);
       attachmentitem.setAttribute("onmouseout",
                                   "MsgStatusFeedback.setOverLink('')");
       attachmentitem.setAttribute("onfocus",
                                   `MsgStatusFeedback.setOverLink("${displayUrl}")`);
       attachmentitem.setAttribute("onblur",
                                   "MsgStatusFeedback.setOverLink('')");
-
-      let name = attachmentitem.boxObject.firstChild
-                               .getElementsByClassName("attachmentcell-name");
+      let name = document.getAnonymousNodes(attachmentitem)[0]
+        .getElementsByClassName("attachmentcell-name");
       name[0].classList.add("text-link");
 
       if (attachment.isLinkAttachment) {
         if (index == 0) {
           attachment.size = currentAttachments[index].size;
         }
       }
 
@@ -2662,17 +2661,17 @@ function addAttachmentToPopup(popup, att
 
   if (attachment.isExternalAttachment) {
     if (!attachment.hasFile) {
       item.classList.add("notfound");
     } else {
       // The text-link class must be added to the <label> and have a <menu>
       // hover rule. Adding to <menu> makes hover overflow the underline to
       // the popup items.
-      let label = item.boxObject.firstChild.nextSibling;
+      let label = item.children[1];
       label.classList.add("text-link");
     }
   }
 
   if (attachment.isDeleted) {
     item.classList.add("notfound");
   }