Bug 588881 - Increase default viewport width to 980px [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Fri, 10 Sep 2010 14:22:19 -0700
changeset 66561 a9d023f0f8c823c2cf402d86259bfe302621fb4c
parent 66560 6b9420db098c03f2a7f870a33b0943079466ac77
child 66562 7414284043f265c814abe9026160ffcb708e7e9d
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
bugs588881
Bug 588881 - Increase default viewport width to 980px [r=mfinkle]
mobile/chrome/content/browser.js
mobile/chrome/tests/browser_viewport.js
mobile/chrome/tests/browser_viewport_00.html
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -51,17 +51,17 @@
 let Cc = Components.classes;
 let Ci = Components.interfaces;
 let Cu = Components.utils;
 
 function getBrowser() {
   return Browser.selectedBrowser;
 }
 
-const kDefaultBrowserWidth = 800;
+const kDefaultBrowserWidth = 980;
 
 // Override sizeToContent in the main window. It breaks things (bug 565887)
 window.sizeToContent = function() {
   Components.utils.reportError("window.sizeToContent is not allowed in this window");
 }
 
 #ifdef MOZ_CRASH_REPORTER
 XPCOMUtils.defineLazyServiceGetter(this, "CrashReporter",
--- a/mobile/chrome/tests/browser_viewport.js
+++ b/mobile/chrome/tests/browser_viewport.js
@@ -50,17 +50,17 @@ function pageLoaded(url) {
   dump("------- pageLoaded: " + url + "\n")
   return function() {
     dump("------- waiting for pageLoaded: " + working_tab.browser.currentURI.spec + "\n")
     return !working_tab.isLoading() && working_tab.browser.currentURI.spec == url;
   }
 }
 
 let testData = [
-  { width: 800,     scale: 1 },
+  { width: 980,     scale: 800/980 },
   { width: 533.33,  scale: 1.5 },
   { width: 533.33,  scale: 1.5 },
   { width: 533.33,  scale: 1.5,    disableZoom: true },
   { width: 200,     scale: 4.00 },
   { width: 2000,    scale: 1.125,  minScale: 1.125 },
   { width: 266.67,  scale: 3,      maxScale: 3 },
   { width: 2000,    scale: 1.125 },
   { width: 10000,   scale: 4 },
@@ -87,17 +87,17 @@ function startTest(n) {
 function verifyBlank(n) {
   return function() {
     // Do sanity tests
     var uri = working_tab.browser.currentURI.spec;
     is(uri, testURL_blank, "URL Matches blank page "+n);
 
     // Check viewport settings
     let style = window.getComputedStyle(working_tab.browser, null);
-    is(style.width, "800px", "Normal 'browser' width is 800 pixels");
+    is(style.width, "980px", "Normal 'browser' width is 980 pixels");
 
     loadTest(n);
   }
 }
 
 function loadTest(n) {
   let url = testURL(n);
   BrowserUI.goToURI(url);
--- a/mobile/chrome/tests/browser_viewport_00.html
+++ b/mobile/chrome/tests/browser_viewport_00.html
@@ -1,14 +1,14 @@
 <html>
 <head>
     <title>Browser Viewport Page 00</title>
     <meta name="viewport" content=""/>
 
     <!-- Expected: treat page like a desktop webpage -->
-    <meta name="expected-width" content="800"/>
+    <meta name="expected-width" content="980"/>
     <meta name="expected-scale" content="1"/>
 </head>
 <body>
     <p>Browser Viewport Page 00</p>
     <p>default width, default initial-scale</p>
 </body>
 </html>