Bug 529125: [Regression] Controls are slightly pannable [r=mark.finkle]
authorVivien Nicolas <21@vingtetun.org>
Tue, 17 Nov 2009 09:23:56 -0500
changeset 65805 0857d0823067ab9d166db9ac81575c19f9d8df8e
parent 65804 50febfbe0ef5b6a2ccfa92d94674a5b4511035f0
child 65806 442eb7ecef4877d05877133e6a7a5cc2e049bff4
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)
reviewersmark
bugs529125
Bug 529125: [Regression] Controls are slightly pannable [r=mark.finkle]
mobile/chrome/content/tabs.xml
--- a/mobile/chrome/content/tabs.xml
+++ b/mobile/chrome/content/tabs.xml
@@ -111,22 +111,22 @@
             this._updateWidth();
           ]]>
         </body>
       </method>
 
       <method name="resize">
         <body>
           <![CDATA[
-            let container = document.getElementById("tabs-container").getBoundingClientRect();
-            let el = this.getBoundingClientRect();
+            let container = this.parentNode.getBoundingClientRect();
+            let element   = this.getBoundingClientRect();
             
-            let height = container.top + (el.top - container.top)
-                                       + ((container.top + container.height) - (el.top + el.height));
-            this.style.height = (window.innerHeight - height) + "px";
+            let height = (element.top - container.top) +
+                         ((container.top + container.height) - (element.top + element.height));
+            this.style.height = height + "px";
 
             this._updateWidth();
           ]]>
         </body>
       </method>
 
       <field name="_columnsCount">1</field>
       <method name="_updateWidth">