Bug 618212 - JavaScript Error in arrowbox.xml [r=mbrubeck]
authorMark Finkle <mfinkle@mozilla.com>
Thu, 09 Dec 2010 19:17:27 -0500
changeset 67103 2c6b54fcb3aeb4f05bf95664f13826e3ce6e6a6e
parent 67102 72d4996f125ecae40a7bf8e084d4342eea1db5ab
child 67104 4fb558cc87d18f3d75d543870d2d3bc341ea82e4
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
bugs618212
Bug 618212 - JavaScript Error in arrowbox.xml [r=mbrubeck]
mobile/chrome/content/bindings/arrowbox.xml
--- a/mobile/chrome/content/bindings/arrowbox.xml
+++ b/mobile/chrome/content/bindings/arrowbox.xml
@@ -80,26 +80,26 @@
       <property name="offset" onget="return parseInt(this.getAttribute('offset')) || 0;"
                               onset="this.setAttribute('offset', val); return val;"/>
 
       <field name="anchorNode">null</field>
       <method name="anchorTo">
          <parameter name="aAnchorNode"/>
          <body>
             <![CDATA[
+              let arrow = document.getAnonymousElementByAttribute(this, "anonid", "arrow");
               if (!aAnchorNode) {
-                this.arrow.hidden = true;
+                arrow.hidden = true;
                 return;
               }
 
               this.anchorNode = aAnchorNode;
               let container = document.getAnonymousElementByAttribute(this, "anonid", "container");
               let content = document.getAnonymousElementByAttribute(this, "anonid", "arrowcontent");
               let arrowbox = document.getAnonymousElementByAttribute(this, "anonid", "arrowbox");
-              let arrow = document.getAnonymousElementByAttribute(this, "anonid", "arrow");
 
               // If the content of the arrowbox if taller than the available
               // screen space, force a maximum height
               this.style.minHeight = "";
               content.style.overflow = "visible";
               const kBottomMargin = 64;
               let contentRect = content.firstChild.getBoundingClientRect();
               if ((contentRect.height + contentRect.top + kBottomMargin) > window.innerHeight) {