Bug 1535272 - Call customElements.upgrade on inner XUL tree of calendar tree bindings; r=Fallen
authorGeoff Lankow <geoff@darktrojan.net>
Fri, 15 Mar 2019 11:03:12 +1300
changeset 26094 af3e3d4899f5
parent 26093 5dbc2aa48128
child 26095 264e469aa3df
push id15666
push usergeoff@darktrojan.net
push dateThu, 14 Mar 2019 22:07:07 +0000
treeherdercomm-central@a8263af5473c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFallen
bugs1535272
Bug 1535272 - Call customElements.upgrade on inner XUL tree of calendar tree bindings; r=Fallen
calendar/base/content/calendar-task-tree.xml
calendar/base/content/widgets/calendar-list-tree.xml
--- a/calendar/base/content/calendar-task-tree.xml
+++ b/calendar/base/content/calendar-task-tree.xml
@@ -113,16 +113,17 @@
           const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
           const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
           // set up the tree filter
           this.mFilter = new calFilter();
 
           // set up the custom tree view
           let tree = document.getAnonymousElementByAttribute(this, "anonid", "calendar-task-tree");
+          customElements.upgrade(tree);
           this.mTreeView.tree = tree;
           tree.view = this.mTreeView;
 
           // set up our calendar event observer
           let composite = cal.view.getCompositeCalendar(window);
           composite.addObserver(this.mTaskTreeObserver);
 
           // set up the preference observer
--- a/calendar/base/content/widgets/calendar-list-tree.xml
+++ b/calendar/base/content/widgets/calendar-list-tree.xml
@@ -215,26 +215,26 @@
           <children includes="tooltip|menupopup"/>
         </xul:treechildren>
       </xul:tree>
     </content>
     <implementation implements="nsITreeView">
 
       <field name="mCalendarList">[]</field>
       <field name="mCompositeCalendar">null</field>
-      <field name="tree">null</field>
       <field name="treebox">null</field>
       <field name="ruleCache">null</field>
       <field name="mCachedSheet">null</field>
 
       <field name="mCycleCalendarFlag">null</field>
       <field name="mCycleTimer">null</field>
       <field name="cycleDebounce">200</field>
 
       <constructor><![CDATA[
+          customElements.upgrade(this.tree);
           this.tree.view = this;
           this.ruleCache = {};
           this.mCycleCalendarFlag = {};
       ]]></constructor>
       <destructor><![CDATA[
           // Clean up the calendar manager observers. Do not use removeCalendar
           // here since that will remove the calendar from the composite calendar.
           for (let calendar of this.mCalendarList) {