Bug 600529 - Fix content-viewport height [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 29 Sep 2010 14:48:20 -0700
changeset 66744 8269706ff11b57b9677761585b7eb3c017eedbce
parent 66743 b7f5ebb02f7a7f953e2da5b1deca0548fe1a5dc4
child 66745 632523b71a3e02049d5eb0d4c10e0cbe408f3f0c
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)
reviewersmfinkle
bugs600529
Bug 600529 - Fix content-viewport height [r=mfinkle]
mobile/chrome/content/browser.js
mobile/chrome/content/browser.xul
mobile/chrome/tests/browser_mainui.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -213,17 +213,17 @@ var Browser = {
     };
 
     /* vertically scrolling box that contains the url bar, notifications, and content */
     let pageScrollbox = this.pageScrollbox = document.getElementById("page-scrollbox");
     this.pageScrollboxScroller = pageScrollbox.boxObject.QueryInterface(Ci.nsIScrollBoxObject);
     pageScrollbox.customDragger = controlsScrollbox.customDragger;
 
     let stylesheet = document.styleSheets[0];
-    for each (let style in ["viewport-width", "viewport-height", "window-width", "window-height", "toolbar-height"]) {
+    for each (let style in ["window-width", "window-height", "toolbar-height"]) {
       let index = stylesheet.insertRule("." + style + " {}", stylesheet.cssRules.length);
       this.styles[style] = stylesheet.cssRules[index].style;
     }
 
     function resizeHandler(e) {
       if (e.target != window)
         return;
 
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -269,17 +269,17 @@
 
             <notificationbox id="notifications" class="window-width"/>
 
             <!-- Content viewport -->
             <vbox id="content-viewport" class="window-width window-height">
               <stack id="tile-stack" class="window-width" flex="1">
               <!-- Content viewport -->
                 <html:div>
-                  <html:div id="browsers"/>
+                  <html:div id="browsers" class="window-width window-height"/>
                   <html:canvas id="content-overlay" style="display: none; position: absolute; z-index: 1000; left: 0; top: 0;"/>
                 </html:div>
                 <html:div id="inputhandler-overlay" style="z-index: 1001" tabindex="-1"/>
               </stack>
               <box id="content-navigator-spacer" hidden="true"/>
             </vbox>
           </vbox>
         </scrollbox>
--- a/mobile/chrome/tests/browser_mainui.js
+++ b/mobile/chrome/tests/browser_mainui.js
@@ -2,26 +2,26 @@
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 
 //------------------------------------------------------------------------------
 // Entry point (must be named "test")
 function test() {
   is(window.location.href, "chrome://browser/content/browser.xul", "Main window should be browser.xul");
-  
+
   window.focus();
-  
+
   let browser = Browser.selectedBrowser;
   isnot(browser, null, "Should have a browser");
-  
+
   is(browser.currentURI.spec, Browser.selectedTab.browser.currentURI.spec, "selectedBrowser == selectedTab.browser");
-  
+
   testContentContainerSize();
 }
 
 function testContentContainerSize() {
   let container = document.getElementById("content-viewport");
 
   let rect = container.getBoundingClientRect();
-  ok(rect.width == window.innerWidth, "Content container is same width as window");
-  ok(rect.height == window.innerHeight, "Content container is same height as window");
+  is(rect.width, window.innerWidth, "Content container is same width as window");
+  is(rect.height, window.innerHeight, "Content container is same height as window");
 }