about:startup - address remaining review comments
authorDaniel Brooks <db48x@db48x.net>
Fri, 29 Oct 2010 14:16:28 -0500
changeset 58866 2ba79a29163e8c2463a9335d5c8d65fd87da164b
parent 58865 a62968ad14d1b49d85d582202e6fd753b2ce579e
child 58867 98ba0272986dc4d6229cb5da562905cd606d7d54
push idunknown
push userunknown
push dateunknown
milestone2.0b8pre
about:startup - address remaining review comments
toolkit/components/startup/src/nsAppStartup.cpp
toolkit/content/aboutStartup.js
toolkit/locales/en-US/chrome/global/aboutStartup.dtd
toolkit/locales/en-US/chrome/global/aboutStartup.properties
toolkit/themes/gnomestripe/global/aboutStartup.css
toolkit/themes/pinstripe/global/aboutStartup.css
toolkit/themes/winstripe/global/aboutStartup.css
--- a/toolkit/components/startup/src/nsAppStartup.cpp
+++ b/toolkit/components/startup/src/nsAppStartup.cpp
@@ -66,16 +66,17 @@
 
 #include "prprf.h"
 #include "nsCRT.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsWidgetsCID.h"
 #include "nsAppShellCID.h"
 #include "mozilla/Services.h"
 #include "mozilla/storage.h"
+#include "mozIStorageAsyncStatement.h"
 #include "mozilla/FunctionTimer.h"
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsIXULRuntime.h"
 #include "nsIXULAppInfo.h"
 #include "nsXPCOMCIDInternal.h"
 #include "nsIPropertyBag2.h"
 
 static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
@@ -131,17 +132,16 @@ nsAppStartup::Init()
   nsCOMPtr<nsIObserverService> os =
     mozilla::services::GetObserverService();
   if (!os)
     return NS_ERROR_FAILURE;
 
   NS_TIME_FUNCTION_MARK("Got Observer service");
 
   os->AddObserver(this, "quit-application-forced", PR_TRUE);
-  os->AddObserver(this, "sessionstore-browser-state-restored", PR_TRUE);
   os->AddObserver(this, "sessionstore-windows-restored", PR_TRUE);
   os->AddObserver(this, "AddonManager-event", PR_TRUE);
   os->AddObserver(this, "profile-change-teardown", PR_TRUE);
   os->AddObserver(this, "xul-window-registered", PR_TRUE);
   os->AddObserver(this, "xul-window-destroyed", PR_TRUE);
 
   return NS_OK;
 }
@@ -534,95 +534,128 @@ nsAppStartup::Observe(nsISupports *aSubj
 }
 
 nsresult nsAppStartup::RecordStartupDuration()
 {
   nsresult rv;
   PRTime launched = 0, started = 0;
   mRestoredTimestamp = PR_Now();
 
-  nsCOMPtr<mozIStorageConnection> db;
-  rv = OpenStartupDatabase(getter_AddRefs(db));
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  nsCOMPtr<mozIStorageStatement> statement;
-  rv = db->CreateStatement(NS_LITERAL_CSTRING("INSERT INTO duration VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7)"),
-                           getter_AddRefs(statement));
-  NS_ENSURE_SUCCESS(rv, rv);
-
   nsCOMPtr<nsIXULRuntime> runtime = do_GetService(XULRUNTIME_SERVICE_CONTRACTID);
   nsCOMPtr<nsIXULAppInfo> appinfo = do_QueryInterface(runtime);
 
-  runtime->GetLaunchTimestamp((PRUint64*)&launched);
-  runtime->GetStartupTimestamp((PRUint64*)&started);
+  runtime->GetLaunchTimestamp(reinterpret_cast<PRUint64*>(&launched));
+  runtime->GetStartupTimestamp(reinterpret_cast<PRUint64*>(&started));
 
   if (!launched)
+  {
     launched = started;
+  }
 
   nsCAutoString appVersion, appBuild, platformVersion, platformBuild;
   appinfo->GetVersion(appVersion);
   appinfo->GetAppBuildID(appBuild);
   appinfo->GetPlatformVersion(platformVersion);
   appinfo->GetPlatformBuildID(platformBuild);
 
-  rv = statement->BindInt64Parameter(0, launched);
-  NS_ENSURE_SUCCESS(rv, rv);
-  rv = statement->BindInt64Parameter(1, started - launched);
-  NS_ENSURE_SUCCESS(rv, rv);
-  rv = statement->BindInt64Parameter(2, mRestoredTimestamp - started);
+  nsCOMPtr<mozIStorageConnection> db;
+  rv = OpenStartupDatabase(getter_AddRefs(db));
   NS_ENSURE_SUCCESS(rv, rv);
-  rv = statement->BindStringParameter(3, NS_ConvertUTF8toUTF16(appVersion));
-  NS_ENSURE_SUCCESS(rv, rv); 
-  rv = statement->BindStringParameter(4, NS_ConvertUTF8toUTF16(appBuild));
-  NS_ENSURE_SUCCESS(rv, rv); 
-  rv = statement->BindStringParameter(5, NS_ConvertUTF8toUTF16(platformVersion));
-  NS_ENSURE_SUCCESS(rv, rv);
-  rv = statement->BindStringParameter(6, NS_ConvertUTF8toUTF16(platformBuild));
+
+  NS_NAMED_LITERAL_CSTRING(insert,
+                           "INSERT INTO duration                                       \
+                                        (timestamp, launch, startup, appVersion,       \
+                                         appBuild, platformVersion, platformBuild)     \
+                                   VALUES (:timestamp, :launch, :startup, :appVersion, \
+                                           :appBuild, :platformVersion, :platformBuild)");
+  nsCOMPtr<mozIStorageAsyncStatement> statement;
+  rv = db->CreateAsyncStatement(insert, getter_AddRefs(statement));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = statement->Execute();
+  nsCOMPtr<mozIStorageBindingParamsArray> parametersArray;
+  statement->NewBindingParamsArray(getter_AddRefs(parametersArray));
+  nsCOMPtr<mozIStorageBindingParams> parameters;
+  parametersArray->NewBindingParams(getter_AddRefs(parameters));
+
+  parameters->BindInt64ByName(NS_LITERAL_CSTRING("timestamp"),
+                              launched);
+  parameters->BindInt64ByName(NS_LITERAL_CSTRING("launch"),
+                              started - launched);
+  parameters->BindInt64ByName(NS_LITERAL_CSTRING("startup"),
+                              mRestoredTimestamp - started);
+  parameters->BindUTF8StringByName(NS_LITERAL_CSTRING("appVersion"),
+                                   appVersion);
+  parameters->BindUTF8StringByName(NS_LITERAL_CSTRING("appBuild"),
+                                   appBuild);
+  parameters->BindUTF8StringByName(NS_LITERAL_CSTRING("platformVersion"),
+                                   platformVersion);
+  parameters->BindUTF8StringByName(NS_LITERAL_CSTRING("platformBuild"),
+                                   platformBuild);
+
+  parametersArray->AddParams(parameters);
+  statement->BindParameters(parametersArray);
+
+  nsCOMPtr<mozIStoragePendingStatement> pending;
+  rv = statement->ExecuteAsync(nsnull, getter_AddRefs(pending));
   NS_ENSURE_SUCCESS(rv, rv);
 
+  rv = statement->Finalize();
+  NS_ENSURE_SUCCESS(rv, rv);
+
+  db->Close();
   return NS_OK;
 }
 
 nsresult nsAppStartup::RecordAddonEvent(const PRUnichar *event, nsISupports *details)
 {
   PRTime now = PR_Now();
   nsresult rv;
 
-  nsCOMPtr<mozIStorageConnection> db;
-  rv = OpenStartupDatabase(getter_AddRefs(db));
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  nsCOMPtr<mozIStorageStatement> statement;
-  rv = db->CreateStatement(NS_LITERAL_CSTRING("INSERT INTO events VALUES (?1, ?2, ?3, ?4, ?5)"),
-                           getter_AddRefs(statement));
-  NS_ENSURE_SUCCESS(rv, rv);
-
   nsCOMPtr<nsIPropertyBag2> bag = do_QueryInterface(details);
+  NS_ENSURE_STATE(bag);
   nsAutoString id, name, version;
   bag->GetPropertyAsAString(NS_LITERAL_STRING("id"), id);
   bag->GetPropertyAsAString(NS_LITERAL_STRING("name"), name);
   bag->GetPropertyAsAString(NS_LITERAL_STRING("version"), version);
 
-  rv = statement->BindInt64Parameter(0, now);
+  nsCOMPtr<mozIStorageConnection> db;
+  rv = OpenStartupDatabase(getter_AddRefs(db));
   NS_ENSURE_SUCCESS(rv, rv);
-  rv = statement->BindStringParameter(1, id);
-  NS_ENSURE_SUCCESS(rv, rv); 
-  rv = statement->BindStringParameter(2, name);
-  NS_ENSURE_SUCCESS(rv, rv); 
-  rv = statement->BindStringParameter(3, version);
-  NS_ENSURE_SUCCESS(rv, rv);
-  rv = statement->BindStringParameter(4, nsDependentString(event));
+
+  NS_NAMED_LITERAL_CSTRING(insert,
+                           "INSERT INTO events (timestamp, extid, name, version, action) \
+                                   VALUES (:timestamp, :extid, :name, :version, :action)");
+  nsCOMPtr<mozIStorageAsyncStatement> statement;
+  rv = db->CreateAsyncStatement(insert, getter_AddRefs(statement));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = statement->Execute();
+  nsCOMPtr<mozIStorageBindingParamsArray> parametersArray;
+  statement->NewBindingParamsArray(getter_AddRefs(parametersArray));
+  nsCOMPtr<mozIStorageBindingParams> parameters;
+  parametersArray->NewBindingParams(getter_AddRefs(parameters));
+
+  parameters->BindInt64ByName(NS_LITERAL_CSTRING("timestamp"),
+                              now);
+  parameters->BindUTF8StringByName(NS_LITERAL_CSTRING("extid"),
+                                   NS_ConvertUTF16toUTF8(id));
+  parameters->BindUTF8StringByName(NS_LITERAL_CSTRING("name"),
+                                   NS_ConvertUTF16toUTF8(name));
+  parameters->BindUTF8StringByName(NS_LITERAL_CSTRING("version"),
+                                   NS_ConvertUTF16toUTF8(version));
+  parameters->BindUTF8StringByName(NS_LITERAL_CSTRING("action"),
+                                   NS_ConvertUTF16toUTF8(nsDependentString(event)));
+
+  parametersArray->AddParams(parameters);
+  statement->BindParameters(parametersArray);
+
+  nsCOMPtr<mozIStoragePendingStatement> pending;
+  rv = statement->ExecuteAsync(nsnull, getter_AddRefs(pending));
   NS_ENSURE_SUCCESS(rv, rv);
 
+  db->Close();
   return NS_OK;
 }
 
 nsresult OpenStartupDatabase(mozIStorageConnection **db)
 {
   nsresult rv;
   nsCOMPtr<nsIFile> file;
   rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(file));
@@ -633,42 +666,54 @@ nsresult OpenStartupDatabase(mozIStorage
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = svc->OpenDatabase(file, db);
   if (NS_ERROR_FILE_CORRUPTED == rv)
   {
     svc->BackupDatabaseFile(file, NS_LITERAL_STRING("startup.sqlite.backup"),
                             nsnull, nsnull);
     rv = svc->OpenDatabase(file, db);
-    NS_ENSURE_SUCCESS(rv, rv);
   }
   NS_ENSURE_SUCCESS(rv, rv);
+  (*db)->SetSchemaVersion(1);
 
   rv = EnsureTable(*db,
                    NS_LITERAL_CSTRING("duration"),
-                   NS_LITERAL_CSTRING("timestamp INTEGER, launch INTEGER, startup INTEGER, appVersion TEXT, appBuild TEXT, platformVersion TEXT, platformBuild TEXT"));
+                   NS_LITERAL_CSTRING("timestamp INTEGER,             \
+                                       launch INTEGER,                \
+                                       startup INTEGER,               \
+                                       appVersion TEXT,               \
+                                       appBuild TEXT,                 \
+                                       platformVersion TEXT,          \
+                                       platformBuild TEXT"));
   NS_ENSURE_SUCCESS(rv, rv);
   rv = EnsureTable(*db,
                    NS_LITERAL_CSTRING("events"),
-                   NS_LITERAL_CSTRING("timestamp INTEGER, id TEXT, name TEXT, version TEXT, action TEXT"));
+                   NS_LITERAL_CSTRING("timestamp INTEGER,             \
+                                       extid TEXT,                    \
+                                       name TEXT,                     \
+                                       version TEXT,                  \
+                                       action TEXT"));
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
 nsresult EnsureTable(mozIStorageConnection *db, const nsACString &table,
                      const nsACString &schema)
 {
   nsresult rv;
   PRBool exists = false;
   rv = db->TableExists(table, &exists);
   NS_ENSURE_SUCCESS(rv, rv);
   if (!exists)
+  {
     rv = db->CreateTable(PromiseFlatCString(table).get(),
                          PromiseFlatCString(schema).get());
+  }
   NS_ENSURE_SUCCESS(rv, rv);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsAppStartup::GetRestoredTimestamp(PRUint64 *aResult)
 {
   *aResult = (PRTime)mRestoredTimestamp;
--- a/toolkit/content/aboutStartup.js
+++ b/toolkit/content/aboutStartup.js
@@ -9,17 +9,17 @@
  * Software distributed under the License is distributed on an "AS IS" basis,
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  * for the specific language governing rights and limitations under the
  * License.
  *
  * The Original Code is the about:startup page.
  *
  * The Initial Developer of the Original Code is
- * Mozilla Foundation.
+ * the Mozilla Foundation
  * Portions created by the Initial Developer are Copyright (C) 2010
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
  *   Daniel Brooks <db48x@db48x.net>
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -41,28 +41,36 @@ Components.utils.import("resource://gre/
 
 let strings = Services.strings.createBundle("chrome://global/locale/aboutStartup.properties");
 let branding = Services.strings.createBundle("chrome://branding/locale/brand.properties");
 let brandShortName = branding.GetStringFromName("brandShortName");
 
 function displayTimestamp(id, µs) document.getElementById(id).textContent = formatstamp(µs);
 function displayDuration(id, µs) document.getElementById(id).nextSibling.textContent = formatms(msFromµs(µs));
 
+function getStr(str)
+{
+  try {
+    return strings.getStringFromName("about.startup."+ str);
+  } catch (x) {
+    return str;
+  }
+}
 function formatStr(str, args)
 {
   try {
     return strings.formatStringFromName("about.startup."+ str, args, args.length);
   } catch (x) {
     return str +" "+ args.toSource();
   }
 }
 function appVersion(version, build) formatStr("appVersion", [brandShortName, version, build]);
 function formatExtension(str, name, version) formatStr("extension"+(str.replace(/^on/, "")
-                                                                                                 .replace(/ing$/, "ed")),
-                                                                            [name, version]);
+                                                                       .replace(/ing$/, "ed")),
+                                                       [name, version]);
 
 function msFromµs(µs) µs / 1000;
 function formatstamp(µs) new Date(msFromµs(µs));
 function formatµs(µs) µs + " µs";
 function formatms(ms) formatStr("milliseconds", [ms]);
 
 function point(stamp, µs, v, b) [msFromµs(stamp), msFromµs(µs), { appVersion: v, appBuild: b }];
 function range(a, b) ({ from: msFromµs(a), to: msFromµs(b || a) });
@@ -71,16 +79,18 @@ function label(r, l) $.extend(r, { label
 function color(r, c) $.extend(r, { color: c });
 function major(r) color(r, "#444");
 function minor(r) color(r, "#AAA");
 function green(r) color(r, "#00F");
 function majorMark(x, l) label(major(mark(range(x))), l);
 function minorMark(x, l) label(minor(mark(range(x))), l);
 function extensionMark(x, l) label(green(mark(range(x))), l);
 
+function clamp(min, value, max) Math.max(min, (Math.min(value, max)));
+
 ///// First, display the timings from the current startup
 let launched, startup, restored;
 
 try {
   displayTimestamp("launched", launched = Services.appinfo.launchTimestamp);
 } catch(x) { }
 
 displayTimestamp("started", startup = Services.appinfo.startupTimestamp);
@@ -120,20 +130,20 @@ var overviewOpts = $.extend(true, {}, op
                               grid: { show: false },
                               series: { lines: { show: true, fill: true,
                                                  lineWidth: 1 },
                                         points: { show: false },
                                         shadowSize: 0
                                       },
                             });
 
-var series = [{ label: "Launch Time",
+var series = [{ label: getStr("duration.launch"),
                 data: []
               },
-              { label: "Startup Time",
+              { label: getStr("duration.startup"),
                 data: []
               }
              ];
 
 $("#graph").bind("plotselected", function (event, ranges)
 {
   // do the zooming
   graph = $.plot($("#graph"),
@@ -192,19 +202,23 @@ function populateMeasurements()
         let version = row.getResultByName("appVersion");
         let build = row.getResultByName("appBuild");
         if (lastver != version)
         {
           options.grid.markings.push(majorMark(stamp, appVersion(version,
                                                                  build)));
         }
         else
+        {
           if (lastbuild != build)
+          {
             options.grid.markings.push(minorMark(stamp, appVersion(version,
                                                                    build)));
+          }
+        }
 
         lastver = version;
         lastbuild = build;
         let l = row.getResultByName("launch"),
             s = row.getResultByName("startup");
         series[1].data.push(point(stamp, l, version, build));
         series[0].data.push(point(stamp, l + s, version, build));
         table.appendChild(tr(td(formatstamp(stamp)),
@@ -225,17 +239,19 @@ function populateMeasurements()
     handleCompletion: function()
     {
       var table = $("table");
       var height = $(window).height() - (table.offset().top +
                                          table.outerHeight(true))
                                       - 110;
       $("#graph").height(Math.max(350, height));
 
-      options.xaxis.min = Date.now() - 604800000; // 7 days in milliseconds
+      options.xaxis.min = clamp(Date.now() - 3600000,    // 1 hour in milliseconds
+                                series[0].data[0][0],
+                                Date.now() - 604800000); // 7 days in milliseconds
       var max = 0;
       for each (let [stamp, d] in series[0].data)
         if (stamp >= options.xaxis.min && d > max)
           max = d;
       options.yaxis.max = max;
 
       graph = $.plot($("#graph"), series, options);
 
@@ -245,32 +261,32 @@ function populateMeasurements()
       overview = $.plot($("#overview"), series, overviewOpts);
       go();
     },
   });
 }
 
 function populateEvents()
 {
-  let s = "SELECT timestamp, id, name, version, action FROM events";
+  let s = "SELECT timestamp, extid, name, version, action FROM events";
   var query = db.createStatement(s);
   let lastver, lastbuild;
   let hasresults;
 
   query.executeAsync({
     handleResult: function(results)
     {
       Application.getExtensions(function (extensions)
       {
         let table = document.getElementById("events-table");
         for (let row = results.getNextRow(); row; row = results.getNextRow())
         {
           hasresults = true;
           let stamp = row.getResultByName("timestamp"),
-              id = row.getResultByName("id"),
+              id = row.getResultByName("extid"),
               extension = extensions.get(id),
               name = extension ? extension.name : row.getResultByName("name"),
               version = row.getResultByName("version"),
               action = row.getResultByName("action");
 
           options.grid.markings.push(extensionMark(stamp,
                                                    formatExtension(action,
                                                                    name,
--- a/toolkit/locales/en-US/chrome/global/aboutStartup.dtd
+++ b/toolkit/locales/en-US/chrome/global/aboutStartup.dtd
@@ -26,17 +26,17 @@ launch process. -->
 <!ENTITY about.startup.duration.launch "Launch Time">
 
 <!-- LOCALIZATION NOTE (about.startup.duration.startup): The amount of
 time between the startup and ready timestamps; the duration of the
 startup process. -->
 <!ENTITY about.startup.duration.startup "Startup Time">
 
 <!-- LOCALIZATION NOTE (about.startup.duration.ready): The total time
-that the user had to wait between when they lauched firefox and it was
+that the user had to wait between when they launched firefox and it was
 ready to use. -->
 <!ENTITY about.startup.duration.ready "Elapsed Time">
 
 <!ENTITY about.startup.version "Version">
 <!ENTITY about.startup.table "Show Table">
 <!ENTITY about.startup.graph "Show Graph">
 <!ENTITY about.startup.extension "Extension">
 <!ENTITY about.startup.extensionID "ID">
--- a/toolkit/locales/en-US/chrome/global/aboutStartup.properties
+++ b/toolkit/locales/en-US/chrome/global/aboutStartup.properties
@@ -1,10 +1,10 @@
 # LOCALIZATION NOTE (about.startup.appVersion): %1$S will be
-# &brandShortName;, %2$S will be the version number, and %$S3 will be
+# &brandShortName;, %2$S will be the version number, and %3$S will be
 # the Gecko build id. ex: "Firefox 4.0b6pre (20100909051952)"
 about.startup.appVersion=%1$S %2$S (%3$S)
 # LOCALIZATION NOTE (about.startup.extensionInstalled): %1$S will be
 # the name of an extension, and %2$S will be its version number
 about.startup.extensionInstalled=%1$S %2$S installed
 # LOCALIZATION NOTE (about.startup.extensionUninstalled): %1$S will be
 # the name of an extension, and %2$S will be its version number
 about.startup.extensionUninstalled=%1$S %2$S uninstalled
@@ -15,8 +15,16 @@ about.startup.extensionUpgraded=%1$S upg
 # name of an extension, and %2$S will be its version number
 about.startup.extensionEnabled=%1$S %2$S enabled
 # LOCALIZATION NOTE (about.startup.extensionDisabled): %1$S will be
 # the name of an extension, and %2$S will be its version number
 about.startup.extensionDisabled=%1$S %2$S disabled
 # LOCALIZATION NOTE (about.startup.milliseconds): formats a number
 # (%1$S) as milliseconds
 about.startup.milliseconds=%1$S ms
+# LOCALIZATION NOTE (about.startup.duration.launch): The amount of
+# time between the launch and startup timestamps; the duration of the
+# launch process.
+about.startup.duration.launch=Launch Time
+# LOCALIZATION NOTE (about.startup.duration.startup): The amount of
+# time between the startup and ready timestamps; the duration of the
+# startup process.
+about.startup.duration.startup=Startup Time
--- a/toolkit/themes/gnomestripe/global/aboutStartup.css
+++ b/toolkit/themes/gnomestripe/global/aboutStartup.css
@@ -1,71 +1,75 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the about:startup page.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Daniel Brooks <db48x@db48x.net>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-h1 {
-    font-size: 140%;
-    margin: .5em 0;
-}
-
-#graph, #overview {
-    margin: 0;
-    width: 100%;
-    height: 350px;
-}
-
-#overview {
-    height: 100px;
-}
-
-.toggle {
-    font-size: smaller;
-    padding: 1pt;
-    position: absolute;
-    right: 0;
-    text-align: right;
-}
-
-#showgraph {
-    display: none;
-}
-
-#tables {
-    display: none;
-}
-
-.legend table {
-    width: auto;
-}
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the about:startup page.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Daniel Brooks <db48x@db48x.net>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+h1 {
+    font-size: 140%;
+    margin: .5em 0;
+}
+
+#graph, #overview {
+    margin: 0;
+    width: 100%;
+    height: 350px;
+}
+
+#overview {
+    height: 100px;
+}
+
+.toggle {
+    font-size: smaller;
+    padding: 1pt;
+    position: absolute;
+    right: 0;
+    text-align: right;
+}
+
+#showgraph {
+    display: none;
+}
+
+#tables {
+    display: none;
+}
+
+.legend table {
+    width: auto;
+}
+
+#tables > table {
+  margin-top: 1em;
+}
--- a/toolkit/themes/pinstripe/global/aboutStartup.css
+++ b/toolkit/themes/pinstripe/global/aboutStartup.css
@@ -1,71 +1,75 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the about:startup page.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Daniel Brooks <db48x@db48x.net>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-h1 {
-    font-size: 140%;
-    margin: .5em 0;
-}
-
-#graph, #overview {
-    margin: 0;
-    width: 100%;
-    height: 350px;
-}
-
-#overview {
-    height: 100px;
-}
-
-.toggle {
-    font-size: smaller;
-    padding: 1pt;
-    position: absolute;
-    right: 0;
-    text-align: right;
-}
-
-#showgraph {
-    display: none;
-}
-
-#tables {
-    display: none;
-}
-
-.legend table {
-    width: auto;
-}
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the about:startup page.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Daniel Brooks <db48x@db48x.net>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+h1 {
+    font-size: 140%;
+    margin: .5em 0;
+}
+
+#graph, #overview {
+    margin: 0;
+    width: 100%;
+    height: 350px;
+}
+
+#overview {
+    height: 100px;
+}
+
+.toggle {
+    font-size: smaller;
+    padding: 1pt;
+    position: absolute;
+    right: 0;
+    text-align: right;
+}
+
+#showgraph {
+    display: none;
+}
+
+#tables {
+    display: none;
+}
+
+.legend table {
+    width: auto;
+}
+
+#tables > table {
+  margin-top: 1em;
+}
--- a/toolkit/themes/winstripe/global/aboutStartup.css
+++ b/toolkit/themes/winstripe/global/aboutStartup.css
@@ -1,71 +1,75 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the about:startup page.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Daniel Brooks <db48x@db48x.net>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-h1 {
-    font-size: 140%;
-    margin: .5em 0;
-}
-
-#graph, #overview {
-    margin: 0;
-    width: 100%;
-    height: 350px;
-}
-
-#overview {
-    height: 100px;
-}
-
-.toggle {
-    font-size: smaller;
-    padding: 1pt;
-    position: absolute;
-    right: 0;
-    text-align: right;
-}
-
-#showgraph {
-    display: none;
-}
-
-#tables {
-    display: none;
-}
-
-.legend table {
-    width: auto;
-}
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the about:startup page.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Daniel Brooks <db48x@db48x.net>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+h1 {
+    font-size: 140%;
+    margin: .5em 0;
+}
+
+#graph, #overview {
+    margin: 0;
+    width: 100%;
+    height: 350px;
+}
+
+#overview {
+    height: 100px;
+}
+
+.toggle {
+    font-size: smaller;
+    padding: 1pt;
+    position: absolute;
+    right: 0;
+    text-align: right;
+}
+
+#showgraph {
+    display: none;
+}
+
+#tables {
+    display: none;
+}
+
+.legend table {
+    width: auto;
+}
+
+#tables > table {
+  margin-top: 1em;
+}