Bug 1535725 - Replace remaining use of boxObject in calendar. r=pmorris
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Sat, 25 May 2019 16:02:18 +0300
changeset 35715 12e96412b2c899fce29e67e6c91bb75c1f12171a
parent 35714 bb64c0fb051bef86799f52ea8256432ce88c52aa
child 35716 576ac4e86bc2428996d6c6cbd977d03d916444da
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewerspmorris
bugs1535725
Bug 1535725 - Replace remaining use of boxObject in calendar. r=pmorris
calendar/base/content/calendar-multiday-base-view.js
calendar/base/content/dialogs/calendar-event-dialog-attendees-custom-elements.js
--- a/calendar/base/content/calendar-multiday-base-view.js
+++ b/calendar/base/content/calendar-multiday-base-view.js
@@ -1541,17 +1541,17 @@
         }
 
         /**
          * Adjust scroll bar spacers if needed.
          */
         adjustScrollBarSpacers() {
             // Get the width or height of the scrollbox scrollbar, depending on view orientation.
             const widthOrHeight = this.getAttribute("orient") == "vertical" ? "width" : "height";
-            const propertyValue = this.scrollbox.boxObject.firstChild.boxObject[widthOrHeight];
+            const propertyValue = this.scrollbox.firstChild.getBoundingClientRect()[widthOrHeight];
 
             // Check if we need to show the headerScrollbarSpacer at all.
             let headerPropVal = propertyValue;
             const headerDayBox = this.querySelector(".headerdaybox");
             if (headerDayBox) {
                 // Only do this when there are multiple days.
                 const headerDayBoxMaxHeight = parseInt(document.defaultView
                     .getComputedStyle(headerDayBox).getPropertyValue("max-height"), 10);
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees-custom-elements.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees-custom-elements.js
@@ -3150,28 +3150,28 @@ class MozCalendarEventFreebusyGrid exten
      * Sets content height and row height of freebusy-grid element.
      */
     calcContentHeight() {
         let items = this.getElementsByTagName("richlistitem");
         this.mContentHeight = 0;
         if (items.length > 0) {
             let i = 0;
             do {
-                this.mRowHeight = items[i].boxObject.height;
+                this.mRowHeight = items[i].getBoundingClientRect().height;
                 ++i;
             } while (i < items.length && !this.mRowHeight);
             this.mContentHeight = this.mRowHeight * items.length;
         }
     }
 
     /**
      * Creates or removes dummy rows.
      */
     createOrRemoveDummyRows() {
-        let listboxHeight = this.boxObject.height;
+        let listboxHeight = this.getBoundingClientRect().height;
 
         // Remove rows to remove scrollbar
         let kids = this.childNodes;
         for (let i = kids.length - 1; this.mContentHeight > listboxHeight && i >= 0; --i) {
             if (kids[i].hasAttribute("_isDummyRow")) {
                 this.mContentHeight -= this.mRowHeight;
                 kids[i].remove();
             }