Merge central to inbound
authorMarco Bonardo <mbonardo@mozilla.com>
Tue, 17 Jan 2012 16:24:46 +0100
changeset 85896 e6b4507afdf6a117e7e84d4cb863c3d62dfb1a49
parent 85895 2613bbdae8c6142f0e47c842bc80885fed47ea77 (current diff)
parent 85878 ff1bedd7d4637cbef5d354765623c210ef0d2b89 (diff)
child 85897 419f8a0f6374c6f69a00577d8b6670883e254a83
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone12.0a1
Merge central to inbound
browser/themes/pinstripe/browser.css
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -232,17 +232,17 @@ pref("lightweightThemes.update.enabled",
 pref("keyword.enabled", true);
 // Override the default keyword.URL. Empty value means
 // "use the search service's default engine"
 pref("keyword.URL", "");
 
 pref("general.useragent.locale", "@AB_CD@");
 pref("general.skins.selectedSkin", "classic/1.0");
 
-pref("general.smoothScroll", false);
+pref("general.smoothScroll", true);
 #ifdef UNIX_BUT_NOT_MAC
 pref("general.autoScroll", false);
 #else
 pref("general.autoScroll", true);
 #endif
 
 // Whether or not the application should check at startup each time if it 
 // is the default browser.
@@ -1028,19 +1028,16 @@ pref("devtools.inspector.enabled", true)
 pref("devtools.inspector.htmlHeight", 112);
 
 // Enable the style inspector
 pref("devtools.styleinspector.enabled", true);
 
 // Enable the Tilt inspector
 pref("devtools.tilt.enabled", true);
 
-// Enable the Tilt inspector even if WebGL capabilities are not detected
-pref("devtools.tilt.force-enabled", false);
-
 // Enable the rules view
 pref("devtools.ruleview.enabled", true);
 
 // Enable the Scratchpad tool.
 pref("devtools.scratchpad.enabled", true);
 
 // Enable the Style Editor.
 pref("devtools.styleeditor.enabled", true);
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -1009,18 +1009,18 @@
                          command="Inspector:Inspect"/>
           <arrowscrollbox id="inspector-breadcrumbs"
                           flex="1" orient="horizontal"
                           clicktoscroll="true"/>
           <hbox id="inspector-tools">
             <toolbarbutton id="inspector-3D-button"
                            class="devtools-toolbarbutton"
                            hidden="true"
-                           label="&inspect3DButton.label;"
-                           accesskey="&inspect3DButton.accesskey;"
+                           label="&inspect3DViewButton.label;"
+                           accesskey="&inspect3DViewButton.accesskey;"
                            command="Inspector:Tilt"/>
             <toolbarbutton id="inspector-style-button"
                            class="devtools-toolbarbutton"
                            label="&inspectStyleButton.label;"
                            accesskey="&inspectStyleButton.accesskey;"
                            command="Inspector:Sidebar"/>
             <!-- registered tools go here -->
           </hbox>
--- a/browser/devtools/sourceeditor/orion/mozilla.css
+++ b/browser/devtools/sourceeditor/orion/mozilla.css
@@ -3,16 +3,17 @@
 
 .viewContainer {
   background: #cddae5; /* This will be seen as the continuation of the ruler */
   font-family: monospace;
   font-size: inherit; /* inherit browser's default monospace font size */
 }
 
 .view {
+  color: black; /* Default text color */
   background: #f0f0ff; /* Background of the editor */
   padding-left: 0;
 }
 
 .readonly > .view {
   background: #f0f0ff;
 }
 
--- a/browser/devtools/styleeditor/StyleEditor.jsm
+++ b/browser/devtools/styleeditor/StyleEditor.jsm
@@ -746,80 +746,38 @@ StyleEditor.prototype = {
   /**
    * Load source from the HTTP cache.
    *
    * @param string aHref
    *        URL for the stylesheet.
    */
   _loadSourceFromCache: function SE__loadSourceFromCache(aHref)
   {
-    try {
-      let cacheService = Cc["@mozilla.org/network/cache-service;1"]
-                           .getService(Ci.nsICacheService);
-      let session = cacheService.createSession("HTTP", Ci.nsICache.STORE_ANYWHERE, true);
-      session.doomEntriesIfExpired = false;
-      session.asyncOpenCacheEntry(aHref, Ci.nsICache.ACCESS_READ, {
-        onCacheEntryAvailable: this._onCacheEntryAvailable.bind(this)
-      });
-    } catch (ex) {
-      this._signalError(LOAD_ERROR);
-    }
-  },
-
-   /**
-    * The nsICacheListener.onCacheEntryAvailable method implementation used when
-    * the style sheet source is loaded from the browser cache.
-    *
-    * @param nsICacheEntryDescriptor aEntry
-    * @param nsCacheAccessMode aMode
-    * @param integer aStatus
-    */
-  _onCacheEntryAvailable: function SE__onCacheEntryAvailable(aEntry, aMode, aStatus)
-  {
-    if (!Components.isSuccessCode(aStatus)) {
-      return this._signalError(LOAD_ERROR);
-    }
-
-    let stream = aEntry.openInputStream(0);
+    let channel = Services.io.newChannel(aHref, null, null);
     let chunks = [];
     let streamListener = { // nsIStreamListener inherits nsIRequestObserver
       onStartRequest: function (aRequest, aContext, aStatusCode) {
-      },
+        if (!Components.isSuccessCode(aStatusCode)) {
+          return this._signalError(LOAD_ERROR);
+        }
+      }.bind(this),
       onDataAvailable: function (aRequest, aContext, aStream, aOffset, aCount) {
         chunks.push(NetUtil.readInputStreamToString(aStream, aCount));
       },
       onStopRequest: function (aRequest, aContext, aStatusCode) {
+        if (!Components.isSuccessCode(aStatusCode)) {
+          return this._signalError(LOAD_ERROR);
+        }
+
         this._onSourceLoad(chunks.join(""));
-      }.bind(this),
+      }.bind(this)
     };
 
-    let head = aEntry.getMetaDataElement("response-head");
-    if (/^Content-Encoding:\s*gzip/mi.test(head)) {
-      let converter = Cc["@mozilla.org/streamconv;1?from=gzip&to=uncompressed"]
-                        .createInstance(Ci.nsIStreamConverter);
-      converter.asyncConvertData("gzip", "uncompressed", streamListener, null);
-      streamListener = converter; // proxy original listener via converter
-    }
-
-    try {
-      streamListener.onStartRequest(null, null);
-      while (stream.available()) {
-        streamListener.onDataAvailable(null, null, stream, 0, stream.available());
-      }
-      streamListener.onStopRequest(null, null, 0);
-    } catch (ex) {
-      this._signalError(LOAD_ERROR);
-    } finally {
-      try {
-        stream.close();
-      } catch (ex) {
-        // swallow (some stream implementations can auto-close at eos)
-      }
-      aEntry.close();
-    }
+    channel.loadFlags = channel.LOAD_FROM_CACHE;
+    channel.asyncOpen(streamListener, null);
   },
 
   /**
    * Called when source has been loaded.
    *
    * @param string aSourceText
    */
   _onSourceLoad: function SE__onSourceLoad(aSourceText)
--- a/browser/devtools/styleinspector/CssRuleView.jsm
+++ b/browser/devtools/styleinspector/CssRuleView.jsm
@@ -1137,17 +1137,18 @@ TextPropertyEditor.prototype = {
  *    {function} start:
  *       Will be called when the inplace editor is initialized.
  *    {function} change:
  *       Will be called when the text input changes.  Will be called
  *       with the current value of the text input.
  *    {function} done:
  *       Called when input is committed or blurred.  Called with
  *       current value and a boolean telling the caller whether to
- *       commit the change.
+ *       commit the change.  This function is called after the editor
+ *       has been torn down.
  *    {string} advanceChars:
  *       If any characters in advanceChars are typed, focus will advance
  *       to the next element.
  */
 function editableField(aOptions)
 {
   aOptions.element.addEventListener("focus", function() {
     new InplaceEditor(aOptions);
@@ -1281,21 +1282,21 @@ InplaceEditor.prototype = {
   },
 
   /**
    * Handle loss of focus by calling the client's done handler and
    * clearing out.
    */
   _onBlur: function InplaceEditor_onBlur(aEvent)
   {
+    let val = this.input.value.trim();
+    this._clear();
     if (this.done) {
-      this.done(this.cancelled ? this.initial : this.input.value.trim(),
-                !this.cancelled);
+      this.done(this.cancelled ? this.initial : val, !this.cancelled);
     }
-    this._clear();
   },
 
   _onKeyPress: function InplaceEditor_onKeyPress(aEvent)
   {
     let prevent = false;
     if (aEvent.charCode in this._advanceCharCodes
        || aEvent.keyCode === Ci.nsIDOMKeyEvent.DOM_VK_RETURN) {
       // Focus the next element, triggering a blur which
--- a/browser/devtools/styleinspector/StyleInspector.jsm
+++ b/browser/devtools/styleinspector/StyleInspector.jsm
@@ -76,19 +76,19 @@ StyleInspector.prototype = {
 
     // Were we invoked from the Highlighter?
     if (this.IUI) {
       this.openDocked = true;
       let isOpen = this.isOpen.bind(this);
 
       this.registrationObject = {
         id: "styleinspector",
-        label: this.l10n("style.highlighter.button.label1"),
+        label: this.l10n("style.highlighter.button.label2"),
         tooltiptext: this.l10n("style.highlighter.button.tooltip"),
-        accesskey: this.l10n("style.highlighter.accesskey1"),
+        accesskey: this.l10n("style.highlighter.accesskey2"),
         context: this,
         get isOpen() isOpen(),
         onSelect: this.selectNode,
         onChanged: this.updateNode,
         show: this.open,
         hide: this.close,
         dim: this.dimTool,
         panel: null,
--- a/browser/devtools/styleinspector/styleinspector.css
+++ b/browser/devtools/styleinspector/styleinspector.css
@@ -37,8 +37,12 @@
 
 .ruleview {
   overflow: auto;
 }
 
 .ruleview-computedlist:not(.styleinspector-open) {
   display: none;
 }
+
+.ruleview-code {
+  direction: ltr;
+}
--- a/browser/devtools/tilt/Tilt.jsm
+++ b/browser/devtools/tilt/Tilt.jsm
@@ -266,17 +266,17 @@ Tilt.prototype = {
   },
 
   /**
    * Returns true if this tool is enabled.
    */
   get enabled()
   {
     return (TiltVisualizer.Prefs.enabled &&
-           (TiltVisualizer.Prefs.forceEnabled || TiltGL.isWebGLSupported()));
+           (TiltGL.isWebGLForceEnabled() || TiltGL.isWebGLSupported()));
   },
 
   /**
    * Gets the ID of the current window object to identify the visualizer.
    */
   get currentWindowId()
   {
     let gBrowser = this.chromeWindow.gBrowser;
--- a/browser/devtools/tilt/TiltGL.jsm
+++ b/browser/devtools/tilt/TiltGL.jsm
@@ -32,25 +32,26 @@
  * 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 LGPL or the GPL. 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 *****/
 
-/*global Components, TiltMath, TiltUtils, mat4 */
+/*global Components, Services, TiltMath, TiltUtils, mat4 */
 "use strict";
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 const WEBGL_CONTEXT_NAME = "experimental-webgl";
 
+Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource:///modules/devtools/TiltMath.jsm");
 Cu.import("resource:///modules/devtools/TiltUtils.jsm");
 
 let EXPORTED_SYMBOLS = ["TiltGL"];
 
 /**
  * Module containing thin wrappers around low-level WebGL functions.
  */
@@ -1549,16 +1550,21 @@ TiltGL.ColorShader = {
     "uniform vec4 fill;",
 
     "void main() {",
     "    gl_FragColor = fill;",
     "}"
   ].join("\n")
 };
 
+TiltGL.isWebGLForceEnabled = function TGL_isWebGLForceEnabled()
+{
+  return Services.prefs.getBoolPref("webgl.force-enabled");
+};
+
 /**
  * Tests if the WebGL OpenGL or Angle renderer is available using the
  * GfxInfo service.
  *
  * @return {Boolean} true if WebGL is available
  */
 TiltGL.isWebGLSupported = function TGL_isWebGLSupported()
 {
--- a/browser/devtools/tilt/TiltVisualizer.jsm
+++ b/browser/devtools/tilt/TiltVisualizer.jsm
@@ -1544,38 +1544,23 @@ TiltVisualizer.Prefs = {
 
   set enabled(value)
   {
     TiltUtils.Preferences.set("enabled", "boolean", value);
     this._enabled = value;
   },
 
   /**
-   * Specifies if Tilt should be enabled even if WebGL may not be available.
-   */
-  get forceEnabled()
-  {
-    return this._forceEnabled;
-  },
-
-  set forceEnabled(value)
-  {
-    TiltUtils.Preferences.set("force-enabled", "boolean", value);
-    this._forceEnabled = value;
-  },
-
-  /**
    * Loads the preferences.
    */
   load: function TVC_load()
   {
     let prefs = TiltUtils.Preferences;
 
     TiltVisualizer.Prefs._enabled = prefs.get("enabled", "boolean");
-    TiltVisualizer.Prefs._forceEnabled = prefs.get("force-enabled", "boolean");
   }
 };
 
 /**
  * A custom visualization shader.
  *
  * @param {Attribute} vertexPosition: the vertex position
  * @param {Attribute} vertexTexCoord: texture coordinates used by the sampler
--- a/browser/devtools/tilt/test/Makefile.in
+++ b/browser/devtools/tilt/test/Makefile.in
@@ -46,16 +46,17 @@ include $(topsrcdir)/config/rules.mk
 
 _BROWSER_TEST_FILES = \
 	head.js \
 	browser_tilt_01_lazy_getter.js \
 	browser_tilt_02_notifications.js \
 	browser_tilt_03_tab_switch.js \
 	browser_tilt_04_initialization.js \
 	browser_tilt_05_destruction-esc.js \
+	browser_tilt_05_destruction-url.js \
 	browser_tilt_05_destruction.js \
 	browser_tilt_arcball.js \
 	browser_tilt_controller.js \
 	browser_tilt_gl01.js \
 	browser_tilt_gl02.js \
 	browser_tilt_gl03.js \
 	browser_tilt_gl04.js \
 	browser_tilt_gl05.js \
--- a/browser/devtools/tilt/test/browser_tilt_04_initialization.js
+++ b/browser/devtools/tilt/test/browser_tilt_04_initialization.js
@@ -26,21 +26,16 @@ function test() {
       "The unique window identifiers should match for the same window.");
 
     createTilt({
       onInspectorOpen: function() {
         initialActiveElement = document.activeElement;
 
         is(Tilt.visualizers[id], null,
           "A instance of the visualizer shouldn't be initialized yet.");
-
-        is(typeof TiltVisualizer.Prefs.enabled, "boolean",
-          "The 'enabled' pref should have been loaded by now.");
-        is(typeof TiltVisualizer.Prefs.forceEnabled, "boolean",
-          "The 'force-enabled' pref should have been loaded by now.");
       },
       onTiltOpen: function(instance)
       {
         is(document.activeElement, instance.presenter.canvas,
           "The visualizer canvas should be focused on initialization.");
 
         ok(Tilt.visualizers[id] instanceof TiltVisualizer,
           "A new instance of the visualizer wasn't created properly.");
new file mode 100644
--- /dev/null
+++ b/browser/devtools/tilt/test/browser_tilt_05_destruction-url.js
@@ -0,0 +1,41 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+/*global ok, is, info, waitForExplicitFinish, finish, gBrowser */
+/*global isTiltEnabled, isWebGLSupported, createTab, createTilt */
+/*global Services, EventUtils, Tilt, TiltUtils, InspectorUI, TILT_DESTROYED */
+"use strict";
+
+function test() {
+  if (!isTiltEnabled()) {
+    info("Skipping destruction test because Tilt isn't enabled.");
+    return;
+  }
+  if (!isWebGLSupported()) {
+    info("Skipping destruction test because WebGL isn't supported.");
+    return;
+  }
+
+  waitForExplicitFinish();
+
+  createTab(function() {
+    createTilt({
+      onTiltOpen: function()
+      {
+        Services.obs.addObserver(cleanup, TILT_DESTROYED, false);
+        window.content.location = "about:mozilla";
+      }
+    });
+  });
+}
+
+function cleanup() {
+  let id = TiltUtils.getWindowId(gBrowser.selectedBrowser.contentWindow);
+
+  is(Tilt.visualizers[id], null,
+    "The current instance of the visualizer wasn't destroyed properly.");
+
+  Services.obs.removeObserver(cleanup, TILT_DESTROYED);
+  gBrowser.removeCurrentTab();
+  finish();
+}
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -212,18 +212,23 @@ can reach it easily. -->
 <!ENTITY scratchpad.accesskey         "s">
 <!ENTITY scratchpad.keycode           "VK_F4">
 <!ENTITY scratchpad.keytext           "F4">
 
 <!ENTITY inspectPanelTitle.label        "HTML">
 <!ENTITY inspectButton.label            "Inspect">
 <!ENTITY inspectButton.accesskey        "I">
 <!ENTITY inspectCloseButton.tooltiptext "Close Inspector">
-<!ENTITY inspect3DButton.label        "3D">
-<!ENTITY inspect3DButton.accesskey    "M">
+
+<!-- LOCALIZATION NOTE (inspect3DViewButton.label): This button shows an
+  -  alternate view for the Inspector, creating a 3D visualization of the
+  -  webpage. -->
+<!ENTITY inspect3DViewButton.label     "3D View">
+<!ENTITY inspect3DViewButton.accesskey "W">
+
 <!ENTITY inspectStyleButton.label     "Style">
 <!ENTITY inspectStyleButton.accesskey "S">
 
 <!-- LOCALIZATION NOTE (styleeditor.label): This menu item label appears
   -  in the Tools menu. -->
 <!ENTITY styleeditor.label            "Style Editor">
 <!ENTITY styleeditor.accesskey        "y">
 <!ENTITY styleeditor.keycode          "VK_F7">
--- a/browser/locales/en-US/chrome/browser/devtools/styleinspector.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/styleinspector.properties
@@ -28,18 +28,19 @@ rule.sourceElement=element
 
 # LOCALIZATION NOTE (rule.inheritedSource): Shown for CSS rules
 # that were inherited from a parent node.  Will be passed a node
 # identifier and a source location.
 # e.g "Inherited from body#bodyID (styles.css:20)"
 rule.inheritedSource=Inherited from %S (%S)
 
 # LOCALIZATION NOTE (style.highlighter.button): These strings are used inside
-# sidebar of the Highlighter for the style inspector button
-style.highlighter.button.label1=Properties
-style.highlighter.accesskey1=P
-style.highlighter.button.tooltip=Inspect element styles
+# sidebar of the Highlighter for the style inspector button.
+# "Computed" refers to the Computed Style of the element.
+style.highlighter.button.label2=Computed
+style.highlighter.accesskey2=C
+style.highlighter.button.tooltip=Inspect element computed styles
 
 # LOCALIZATION NOTE (helpLinkTitle): For each style property
 # the user can hover it and get a help link button which allows one to
 # quickly jump to the documentation from the Mozilla Developer Network site.
 # This is the link title shown in the hover tooltip.
 helpLinkTitle=Read the documentation for this property
--- a/browser/themes/gnomestripe/browser.css
+++ b/browser/themes/gnomestripe/browser.css
@@ -1998,16 +1998,20 @@ panel[dimmed="true"] {
   -moz-border-start: 1px solid #242b33;
   min-width: 0;
   width: 3px;
   background-color: transparent;
   -moz-margin-end: -3px;
   position: relative;
 }
 
+#devtools-sidebar-box {
+  background-color: -moz-Field;
+}
+
 /* Highlighter - toolbar resizers */
 
 .inspector-resizer {
   -moz-appearance: none;
   cursor: n-resize;
 }
 
 #inspector-top-resizer {
--- a/browser/themes/gnomestripe/devtools/csshtmltree.css
+++ b/browser/themes/gnomestripe/devtools/csshtmltree.css
@@ -229,20 +229,16 @@
   width: 8px;
   height: 8px;
   background: url("chrome://browser/skin/devtools/arrows.png") 24px 0;
   cursor: pointer;
   -moz-margin-start: 2px;
   -moz-margin-end: 5px;
 }
 
-.ruleview-expander:-moz-locale-dir(rtl) {
-  background-position: 16px 0;
-}
-
 .ruleview-expander.styleinspector-open {
   background-position: 8px 0;
 }
 
 .ruleview-newproperty {
   /* (enable checkbox width: 12px) + (expander width: 15px) */
   -moz-margin-start: 27px;
 }
--- a/browser/themes/pinstripe/browser.css
+++ b/browser/themes/pinstripe/browser.css
@@ -2733,16 +2733,20 @@ panel[dimmed="true"] {
   -moz-border-start: 1px solid #242b33;
   min-width: 0;
   width: 3px;
   background-color: transparent;
   -moz-margin-end: -3px;
   position: relative;
 }
 
+#devtools-sidebar-box {
+  background-color: -moz-Field;
+}
+
 /* Highlighter - toolbar resizers */
 
 .inspector-resizer {
   -moz-appearance: none;
   cursor: n-resize;
 }
 
 #inspector-top-resizer {
--- a/browser/themes/pinstripe/devtools/csshtmltree.css
+++ b/browser/themes/pinstripe/devtools/csshtmltree.css
@@ -231,20 +231,16 @@
   width: 8px;
   height: 8px;
   background: url("chrome://browser/skin/devtools/arrows.png") 24px 0;
   cursor: pointer;
   -moz-margin-start: 2px;
   -moz-margin-end: 5px;
 }
 
-.ruleview-expander:-moz-locale-dir(rtl) {
-  background-position: 16px 0;
-}
-
 .ruleview-expander.styleinspector-open {
   background-position: 8px 0;
 }
 
 .ruleview-newproperty {
   /* (enable checkbox width: 12px) + (expander width: 15px) */
   -moz-margin-start: 27px;
 }
--- a/browser/themes/winstripe/browser.css
+++ b/browser/themes/winstripe/browser.css
@@ -2678,16 +2678,20 @@ panel[dimmed="true"] {
   -moz-border-start: 1px solid #242b33;
   min-width: 0;
   width: 3px;
   background-color: transparent;
   -moz-margin-end: -3px;
   position: relative;
 }
 
+#devtools-sidebar-box {
+  background-color: -moz-Field;
+}
+
 /* Highlighter - toolbar resizers */
 
 .inspector-resizer {
   -moz-appearance: none;
   cursor: n-resize;
 }
 
 #inspector-top-resizer {
--- a/browser/themes/winstripe/devtools/common.css
+++ b/browser/themes/winstripe/devtools/common.css
@@ -69,17 +69,17 @@
 
 .devtools-toolbarbutton[checked] {
   border-color: hsla(211,68%,6%,.6);
   background: -moz-linear-gradient(hsla(211,68%,6%,.1), hsla(211,68%,6%,.2));
   box-shadow: 0 1px 3px hsla(211,68%,6%,.5) inset, 0 0 0 1px hsla(209,29%,72%,.1), 0 1px 0 hsla(210,16%,76%,.1);
   color: hsl(200,100%,60%) !important;
 }
 
-.devtools-toolbarbutton:[checked]:hover:active {
+.devtools-toolbarbutton[checked]:hover:active {
   background-color: hsla(211,68%,6%,.2);
 }
 
 /* Search input */
 
 .devtools-searchinput {
   -moz-appearance: none;
   margin: 0 3px;
--- a/browser/themes/winstripe/devtools/csshtmltree.css
+++ b/browser/themes/winstripe/devtools/csshtmltree.css
@@ -229,20 +229,16 @@
   width: 8px;
   height: 8px;
   background: url("chrome://browser/skin/devtools/arrows.png") 24px 0;
   cursor: pointer;
   -moz-margin-start: 2px;
   -moz-margin-end: 5px;
 }
 
-.ruleview-expander:-moz-locale-dir(rtl) {
-  background-position: 16px 0;
-}
-
 .ruleview-expander.styleinspector-open {
   background-position: 8px 0;
 }
 
 .ruleview-newproperty {
   /* (enable checkbox width: 12px) + (expander width: 15px) */
   -moz-margin-start: 27px;
 }
--- a/build/checksums.py
+++ b/build/checksums.py
@@ -31,16 +31,18 @@
 # 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 *****
 
+from __future__ import with_statement
+
 from optparse import OptionParser
 import logging
 import os
 try:
     import hashlib
 except:
     hashlib = None
 
@@ -52,75 +54,74 @@ def digest_file(filename, digest, chunk_
     work, the None object will be returned instead.  The size of blocks
     that this function will read from the file object it opens based on
     'filename' can be specified by 'chunk_size', which defaults to 1K'''
     assert not os.path.isdir(filename), 'this function only works with files'
     logger = logging.getLogger('checksums.py')
     if hashlib is not None:
         logger.debug('Creating new %s object' % digest)
         h = hashlib.new(digest)
-        f = open(filename, "rb")
-        while True:
-            data = f.read(chunk_size)
-            if not data:
-                logger.debug('Finished reading in file')
-                break
-            h.update(data)
-        f.close()
+        with open(filename, 'rb') as f:
+            while True:
+                data = f.read(chunk_size)
+                if not data:
+                    logger.debug('Finished reading in file')
+                    break
+                h.update(data)
         hash = h.hexdigest()
         logger.debug('Hash for %s is %s' % (filename, hash))
         return hash
     else:
         # In this case we could subprocess.Popen and .communicate with
         # sha1sum or md5sum
         logger.warn('The python module for hashlib is missing!')
         return None
 
 
-def process_files(files, output_filename, digest, strip):
+def process_files(files, output_filename, digests, strip):
     '''This function takes a list of file names, 'files'.  It will then
     compute the checksum for each of the files by opening the files.
     Once each file is read and its checksum is computed, this function
     will write the information to the file specified by 'output_filename'.
     The path written in the output file will have anything specified by 'strip'
     removed from the path.  The output file is closed before returning nothing
-    The algorithm to compute checksums with can be specified by 'digest' 
-    and needs to be a valid OpenSSL algorithm.
+    The algorithm to compute checksums with can be specified by 'digests' 
+    and needs to be a list of valid OpenSSL algorithms.
 
     The output file is written in the format:
         <hash> <algorithm> <filesize> <filepath>
     Example:
         d1fa09a<snip>e4220 sha1 14250744 firefox-4.0b6pre.en-US.mac64.dmg
     '''
 
     logger = logging.getLogger('checksums.py')
     if os.path.exists(output_filename):
         logger.debug('Overwriting existing checksums file "%s"' %
                      output_filename)
     else:
         logger.debug('Creating a new checksums file "%s"' % output_filename)
-    output = open(output_filename, 'w+')
-    for file in files:
-        if os.path.isdir(file):
-            logger.warn('%s is a directory, skipping' % file)
-        else:
-            hash = digest_file(file, digest)
-            if hash is None:
-                logger.warn('Unable to generate a hash for %s. ' +
-                            'Using NOHASH as fallback' % file)
-                hash = 'NOHASH'
-            if file.startswith(strip):
-                short_file = file[len(strip):]
-                short_file = short_file.lstrip('/')
+    with open(output_filename, 'w+') as output:
+        for file in files:
+            if os.path.isdir(file):
+                logger.warn('%s is a directory, skipping' % file)
             else:
-                short_file = file
-            print >>output, '%s %s %s %s' % (hash, digest,
-                                             os.path.getsize(file),
-                                             short_file)
-    output.close()
+                for digest in digests:
+                    hash = digest_file(file, digest)
+                    if hash is None:
+                        logger.warn('Unable to generate a hash for %s. ' +
+                                    'Skipping.' % file)
+                        continue
+                    if file.startswith(strip):
+                        short_file = file[len(strip):]
+                        short_file = short_file.lstrip('/')
+                    else:
+                        short_file = file
+                    print >>output, '%s %s %s %s' % (hash, digest,
+                                                     os.path.getsize(file),
+                                                     short_file)
 
 def setup_logging(level=logging.DEBUG):
     '''This function sets up the logging module using a speficiable logging
     module logging level.  The default log level is DEBUG.
 
     The output is in the format:
         <level> - <message>
     Example:
@@ -136,17 +137,17 @@ def setup_logging(level=logging.DEBUG):
     logger.addHandler(handler)
 
 def main():
     '''This is a main function that parses arguments, sets up logging
     and generates a checksum file'''
     # Parse command line arguments
     parser = OptionParser()
     parser.add_option('-d', '--digest', help='checksum algorithm to use',
-                      action='store', dest='digest', default='sha1')
+                      action='append', dest='digests')
     parser.add_option('-o', '--output', help='output file to use',
                       action='store', dest='outfile', default='checksums')
     parser.add_option('-v', '--verbose',
                       help='Be noisy (takes precedence over quiet)',
                       action='store_true', dest='verbose', default=False)
     parser.add_option('-q', '--quiet', help='Be quiet', action='store_true',
                       dest='quiet', default=False)
     parser.add_option('-s', '--strip',
@@ -162,26 +163,29 @@ def main():
     else:
         loglevel = logging.INFO
 
     #Set up logging
     setup_logging(loglevel)
     logger = logging.getLogger('checksums.py')
 
     # Validate the digest type to use
+    if not options.digests:
+        options.digests = ['sha1']
     try:
-        hashlib.new(options.digest)
+        for digest in options.digests:
+            hashlib.new(digest)
     except ValueError, ve:
         logger.error('Could not create a "%s" hash object (%s)' %
-                     (options.digest, ve.args[0]))
+                     (digest, ve.args[0]))
         exit(1)
 
     # Validate the files to checksum
     files = []
     for i in args:
         if os.path.exists(i):
             files.append(i)
         else:
             logger.info('File "%s" was not found on the filesystem' % i)
-    process_files(files, options.outfile, options.digest, options.strip)
+    process_files(files, options.outfile, options.digests, options.strip)
 
 if __name__ == '__main__':
     main()
--- a/content/base/src/nsGenericElement.cpp
+++ b/content/base/src/nsGenericElement.cpp
@@ -4268,25 +4268,31 @@ static const char* kNSURIs[] = {
   " (RDF)",
   " (XUL)",
   " (SVG)",
   " (XML Events)"
 };
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsGenericElement)
   if (NS_UNLIKELY(cb.WantDebugInfo())) {
-    char name[72];
+    char name[512];
     PRUint32 nsid = tmp->GetNameSpaceID();
     nsAtomCString localName(tmp->NodeInfo()->NameAtom());
+    nsCAutoString uri;
+    if (tmp->OwnerDoc()->GetDocumentURI()) {
+      tmp->OwnerDoc()->GetDocumentURI()->GetSpec(uri);
+    }
+
     if (nsid < ArrayLength(kNSURIs)) {
-      PR_snprintf(name, sizeof(name), "nsGenericElement%s %s", kNSURIs[nsid],
-                  localName.get());
+      PR_snprintf(name, sizeof(name), "nsGenericElement%s %s %s", kNSURIs[nsid],
+                  localName.get(), uri.get());
     }
     else {
-      PR_snprintf(name, sizeof(name), "nsGenericElement %s", localName.get());
+      PR_snprintf(name, sizeof(name), "nsGenericElement %s %s",
+                  localName.get(), uri.get());
     }
     cb.DescribeRefCountedNode(tmp->mRefCnt.get(), sizeof(nsGenericElement),
                               name);
   }
   else {
     NS_IMPL_CYCLE_COLLECTION_DESCRIBE(nsGenericElement, tmp->mRefCnt.get())
   }
 
--- a/content/events/test/test_bug350471.xul
+++ b/content/events/test/test_bug350471.xul
@@ -17,18 +17,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="display: none">
 </div>
 </body>
 
 <script class="testbody" type="application/javascript;version=1.7"><![CDATA[
 
 /** Test for Bug 350471 **/
 
-// This test depends on general.smoothScroll being off.
-
 const minLineHeight = 10, maxLineHeight = 20;
 
 function between(x, min, max) (min <= max) ? (min <= x && x <= max) : (max <= x && x <= min);
 function isbetween(x, min, max, msg) ok(between(x, min, max), msg + " - Expected " + min + " to " + max + ", got " + x);
 
 function testEventDispatching(aWin) {
   function helper(aAxis, aDelta, aKind, aShiftKey, aCtrlKey, aAltKey, aMetaKey) {
     let expectedEvents = [];
@@ -223,28 +221,28 @@ function testDefaultHandling(aWin, andTh
 function initPrefs()
 {
   netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
   var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].
                   getService(Components.interfaces.nsIPrefBranch2);
   // Disables the app level scroll acceleration
   prefSvc.setIntPref("mousewheel.acceleration.start", -1);
   prefSvc.setBoolPref("mousewheel.system_scroll_override_on_root_content.enabled", false);
+  prefSvc.setBoolPref("general.smoothScroll", false);
 }
 
 function clearPrefs()
 {
   netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
   var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].
                   getService(Components.interfaces.nsIPrefBranch2);
 
-  if (prefSvc.prefHasUserValue("mousewheel.acceleration.start"))
-    prefSvc.clearUserPref("mousewheel.acceleration.start");
-  if (prefSvc.prefHasUserValue("mousewheel.system_scroll_override_on_root_content.enabled"))
-    prefSvc.clearUserPref("mousewheel.system_scroll_override_on_root_content.enabled");
+  prefSvc.clearUserPref("mousewheel.acceleration.start");
+  prefSvc.clearUserPref("mousewheel.system_scroll_override_on_root_content.enabled");
+  prefSvc.clearUserPref("general.smoothScroll");
 }
 
 window.onload = function () {
   netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
 
   let win = window.open('data:application/vnd.mozilla.xul+xml,<?xml version="1.0"?><?xml-stylesheet href="chrome://global/skin" type="text/css"?><window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><vbox style="height: 150px; background: cyan; overflow: auto;" id="scrollbox"><hbox style="height: 8000px;"><vbox style="width: 8000px;"/></hbox></vbox></window>', '_blank', 'chrome,width=400,height=200');
   win.onload = function() {
     setTimeout(function() {
--- a/content/events/test/test_bug574663.html
+++ b/content/events/test/test_bug574663.html
@@ -15,18 +15,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="display: none">
 
 </div>
 <pre id="test">
 <script type="application/javascript;version=1.7">
 
 /** Test for Bug 574663 **/
 
-// This test depends on general.smoothScroll being off.
-
 function sendTouchpadScrollMotion(scrollbox, direction, ctrl, momentum) {
   var win = scrollbox.ownerDocument.defaultView;
   let event = {
     'type': "DOMMouseScroll",
     'axis': "vertical",
     'delta': direction,
     'hasPixels': true,
     'ctrlKey': ctrl,
@@ -102,35 +100,34 @@ function runTest() {
   }, win);
 }
 
 function initPrefs()
 {
   netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
   var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].
                   getService(Components.interfaces.nsIPrefBranch2);
+  prefSvc.setBoolPref("general.smoothScroll", false);
   // Disables the app level scroll acceleration
   prefSvc.setIntPref("mousewheel.acceleration.start", -1);
   prefSvc.setBoolPref("mousewheel.system_scroll_override_on_root_content.enabled", false);
   // Enable zooming for ctrl-scrolling
   prefSvc.setIntPref("mousewheel.withcontrolkey.action", 3);
 }
 
 function clearPrefs()
 {
   netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
   var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].
                   getService(Components.interfaces.nsIPrefBranch2);
 
-  if (prefSvc.prefHasUserValue("mousewheel.acceleration.start"))
-    prefSvc.clearUserPref("mousewheel.acceleration.start");
-  if (prefSvc.prefHasUserValue("mousewheel.system_scroll_override_on_root_content.enabled"))
-    prefSvc.clearUserPref("mousewheel.system_scroll_override_on_root_content.enabled");
-  if (prefSvc.prefHasUserValue("mousewheel.withcontrolkey.action"))
-    prefSvc.clearUserPref("mousewheel.withcontrolkey.action");
+  prefSvc.clearUserPref("general.smoothScroll");
+  prefSvc.clearUserPref("mousewheel.acceleration.start");
+  prefSvc.clearUserPref("mousewheel.system_scroll_override_on_root_content.enabled");
+  prefSvc.clearUserPref("mousewheel.withcontrolkey.action");
 }
 
 window.onload = function () {
   initPrefs();
   SimpleTest.executeSoon(runTest);
 }
 
 SimpleTest.waitForExplicitFinish();
--- a/content/html/document/src/ImageDocument.cpp
+++ b/content/html/document/src/ImageDocument.cpp
@@ -608,41 +608,16 @@ ImageDocument::HandleEvent(nsIDOMEvent* 
       }
       mShouldResize = false;
       RestoreImageTo(x, y);
     }
     else if (mImageIsOverflowing) {
       ShrinkToFit();
     }
   }
-  else if (eventType.EqualsLiteral("keypress")) {
-    nsCOMPtr<nsIDOMKeyEvent> keyEvent = do_QueryInterface(aEvent);
-    PRUint32 charCode;
-    bool ctrlKey, metaKey, altKey;
-    keyEvent->GetCharCode(&charCode);
-    keyEvent->GetCtrlKey(&ctrlKey);
-    keyEvent->GetMetaKey(&metaKey);
-    keyEvent->GetAltKey(&altKey);
-    // plus key
-    if (charCode == 0x2B && !ctrlKey && !metaKey && !altKey) {
-      mShouldResize = false;
-      if (mImageIsResized) {
-        ResetZoomLevel();
-        RestoreImage();
-      }
-    }
-    // minus key
-    else if (charCode == 0x2D && !ctrlKey && !metaKey && !altKey) {
-      mShouldResize = true;
-      if (mImageIsOverflowing) {
-        ResetZoomLevel();
-        ShrinkToFit();
-      }
-    }
-  }
 
   return NS_OK;
 }
 
 nsresult
 ImageDocument::CreateSyntheticDocument()
 {
   // Synthesize an html document that refers to the image
--- a/docshell/test/navigation/test_bug430723.html
+++ b/docshell/test/navigation/test_bug430723.html
@@ -38,17 +38,19 @@ var gTallBlueBoxURI = "data:text/html;ch
 // </div></body></html>
 
 
 window.onload = runTest;
 
 var testWindow;
 var testNum = 0;
 
+var smoothScrollPref = "general.smoothScroll";
 function runTest() {
+  SpecialPowers.setBoolPref(smoothScrollPref, false);
   testWindow = window.open(gTallRedBoxURI, "testWindow", "width=300,height=300,location=yes,scrollbars=yes");
 }
 
 var nextTest =function() {
   testNum++;
   switch (testNum) {
     case 1: setTimeout(step1, 0); break;
     case 2: setTimeout(step2, 0); break;
@@ -117,16 +119,17 @@ var step3 =function() {
      "Page1Again: Ensure scroll pane at top before we scroll.");  
   testWindow.addEventListener("scroll", function () {
     testWindow.removeEventListener("scroll", arguments.callee, true);
 
     isnot(testWindow.document.body.scrollTop, 0,
           "Page2Again: Ensure we can still scroll.");  
 
     testWindow.close();
+    SpecialPowers.clearUserPref(smoothScrollPref);
     window.SimpleTest.finish();
   }, true);
   sendKey('DOWN', testWindow);
 }
 
 SimpleTest.waitForExplicitFinish();
 
 //]]>
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -1399,18 +1399,19 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
 NS_INTERFACE_MAP_END
 
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsGlobalWindow)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsGlobalWindow)
 
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsGlobalWindow)
-  if (tmp->mDoc && nsCCUncollectableMarker::InGeneration(
-                     cb, tmp->mDoc->GetMarkedCCGeneration())) {
+  if ((tmp->mDoc && nsCCUncollectableMarker::InGeneration(
+                      cb, tmp->mDoc->GetMarkedCCGeneration())) ||
+      (nsCCUncollectableMarker::sGeneration && tmp->IsBlack())) {
     return NS_SUCCESS_INTERRUPTED_TRAVERSE;
   }
 
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mContext)
 
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mControllers)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mArguments)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mArgumentsLast)
--- a/editor/libeditor/base/tests/test_selection_move_commands.xul
+++ b/editor/libeditor/base/tests/test_selection_move_commands.xul
@@ -4,16 +4,20 @@
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         title="Test for nsSelectionMoveCommands">
   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
+var prefs = Components.classes["@mozilla.org/preferences-service;1"]
+                      .getService(Components.interfaces.nsIPrefBranch);
+prefs.setBoolPref("general.smoothScroll", false);
+
 function runTest() {
   var tests = execTests();
   function execNext() {
     try {
       tests.next();
       setTimeout(execNext, 0);
     } catch (e) {}
   }
@@ -181,26 +185,24 @@ function execTests() {
 
     doCommand("cmd_moveTop");
     is(testPageSelectCommand("cmd_selectPageDown", 0), lineNum, "cmd_selectPageDown");
     doCommand("cmd_moveBottom");
     doCommand("cmd_beginLine");
     is(testPageSelectCommand("cmd_selectPageUp", 0), 22 - lineNum, "cmd_selectPageUp");
   }
 
-  var prefs = Components.classes["@mozilla.org/preferences-service;1"]
-                          .getService(Components.interfaces.nsIPrefBranch);
-  var origPrefValue = prefs.getBoolPref("layout.word_select.eat_space_to_next_word");
   try {
     prefs.setBoolPref("layout.word_select.eat_space_to_next_word", false);
     runSelectionTests(body, 1);
     prefs.setBoolPref("layout.word_select.eat_space_to_next_word", true);
     runSelectionTests(node(2), 0);
   } finally {
-    prefs.setBoolPref("layout.word_select.eat_space_to_next_word", origPrefValue);
+    prefs.clearUserPref("general.smoothScroll");
+    prefs.clearUserPref("layout.word_select.eat_space_to_next_word");
   }
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(runTest);
 ]]>
--- a/editor/libeditor/html/tests/test_bug549262.html
+++ b/editor/libeditor/html/tests/test_bug549262.html
@@ -14,16 +14,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 <p id="display"></p>
 <div id="content">
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 549262 **/
 
+var smoothScrollPref = "general.smoothScroll";
+SpecialPowers.setBoolPref(smoothScrollPref, false);
 SimpleTest.waitForExplicitFinish();
 var win = window.open("file_bug549262.html", "_blank", 
                       "width=600,height=600,scrollbars=yes");
 SimpleTest.waitForFocus(function() {
   // Make sure that pressing Space when a contenteditable element is not focused
   // will scroll the page.
   var ed = win.document.getElementById("editor");
   var sc = win.document.querySelector("a");
@@ -85,16 +87,17 @@ SimpleTest.waitForFocus(function() {
                     oldY = win.scrollY;
                     synthesizeKey("VK_DOWN", {}, win);
                     setTimeout(function() {
                       is(win.scrollY, oldY, "Page is not scrolled down");
                       is(win.getSelection().focusNode, ed.firstChild, "Correct element selected");
                       is(win.getSelection().focusOffset, ed.textContent.length, "Selection should be moved to the end");
 
                       win.close();
+                      SpecialPowers.clearUserPref(smoothScrollPref);
                       SimpleTest.finish();
                     }, 0);
                   }, 0);
                 }, 0);
               }, 0);
             }, 0);
           }, 0);
         }, 0);
--- a/editor/libeditor/html/tests/test_bug620906.html
+++ b/editor/libeditor/html/tests/test_bug620906.html
@@ -29,20 +29,22 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 /** Test for Bug 620906 **/
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
   var iframe = document.querySelector("iframe");
   is(iframe.contentWindow.scrollY, 0, "Sanity check");
   var rect = iframe.getBoundingClientRect();
   setTimeout(function() {
-    synthesizeMouse(iframe, rect.width - 5, rect.height / 2, {});
-    setTimeout(function() {
+    var onscroll = function () {
+      iframe.contentWindow.removeEventListener("scroll", onscroll, false);
       isnot(iframe.contentWindow.scrollY, 0, "The scrollbar should work");
       SimpleTest.finish();
-    }, 0);
+    }
+    iframe.contentWindow.addEventListener("scroll", onscroll, false);
+    synthesizeMouse(iframe, rect.width - 5, rect.height / 2, {});
   }, 0);
 });
 
 </script>
 </pre>
 </body>
 </html>
old mode 100755
new mode 100644
old mode 100755
new mode 100644
--- a/gfx/tests/mochitest/test_acceleration.html
+++ b/gfx/tests/mochitest/test_acceleration.html
@@ -38,44 +38,62 @@ while (windows.hasMoreElements()) {
   if (windowutils.layerManagerType != "Basic") {
     acceleratedWindows++;
   }
 }
 
 var osName = sysInfo.getProperty("name");
 switch(osName)
 {
-  case "Darwin":
+  case "Darwin": // Mac OS X.
     // We only enable OpenGL layers on machines that don't support QuickDraw
     // plugins. x86-64 architecture is a good proxy for this plugin support.
     if (sysInfo.getProperty("arch") != "x86-64") {
       is(acceleratedWindows, 0, "Acceleration not supported on x86 OS X");
     } else {
+      // Workaround for SeaMonkey tinderboxes which don't support acceleration.
+      if (navigator.userAgent.match(/ SeaMonkey\//)) {
+        if (acceleratedWindows == 0) {
+          todo(false, "Acceleration not supported on x86-64 OS X" +
+                      " (This is expected on SeaMonkey (tinderboxes).)");
+          break;
+        }
+      }
+
       isnot(acceleratedWindows, 0, "Acceleration enabled on x86-64 OS X");
     }
     break;
 
-  case "Windows_NT":
+  case "Windows_NT": // Windows.
     var version = parseFloat(sysInfo.getProperty("version"));
     if (version == 5.0) {
       is(acceleratedWindows, 0, "Acceleration not supported on Windows 2000");
     } else {
+      // Workaround for SeaMonkey tinderboxes which don't support acceleration.
+      if (navigator.userAgent.match(/ SeaMonkey\//)) {
+        if (acceleratedWindows == 0) {
+          todo(false, "Acceleration not supported on Windows XP or newer" +
+                      " (This is expected on SeaMonkey (tinderboxes).)");
+          break;
+        }
+      }
+
       isnot(acceleratedWindows, 0, "Acceleration enabled on Windows XP or newer");
     }
 
     var gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
     if (version < 6.0) {
       ok(!gfxInfo.D2DEnabled, "Direct2D not supported on Windows 2003 or older");
       ok(!gfxInfo.DWriteEnabled, "DirectWrite not supported on Windows 2003 or older");
     } else {
       ok(gfxInfo.D2DEnabled, "Direct2D enabled on Windows Vista or newer");
       ok(gfxInfo.DWriteEnabled, "DirectWrite enabled on Windows Vista or newer");
     }
     break;
 
-  default:
+  default: // Linux and others.
     is(acceleratedWindows, 0, "Acceleration not supported on '" + osName + "'");
 }
 
 </script>
 </pre>
 </body>
 </html>
--- a/layout/base/tests/bug389321-1.html
+++ b/layout/base/tests/bug389321-1.html
@@ -7,12 +7,12 @@
   // Enter a character in the span and delete it
   var sel = window.getSelection();
   sel.removeAllRanges();
 
   var area = document.getElementById('t');
   area.focus();
 
   sendKey("W"); // enter a character
-  sendKey("VK_BACK_SPACE");
+  sendKey("BACK_SPACE");
 </script>
 </body>
 </html>
--- a/layout/generic/test/test_bug633762.html
+++ b/layout/generic/test/test_bug633762.html
@@ -37,18 +37,21 @@ function runTests() {
   sendKey("UP");
 
   setTimeout("finish();", 0);
 }
 
 function finish() {
   // assert that scroll top is now less than before
   ok(scrollTopBefore > doc.body.scrollTop, "pressing up arrow should scroll up");
+  SpecialPowers.clearUserPref(smoothScrollPref);
   SimpleTest.finish();
 }
 
+var smoothScrollPref = "general.smoothScroll";
+SpecialPowers.setBoolPref(smoothScrollPref, false);
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(runTests);
 </script>
 </pre>
 
 </body>
 </html>
--- a/layout/style/TopLevelImageDocument.css
+++ b/layout/style/TopLevelImageDocument.css
@@ -44,16 +44,18 @@ body {
 
 /* We must declare the image as a block element. If we stay as
 an inline element, our parent LineBox will be inline too and
 ignore the available height during reflow.
 This is bad during printing, it means tall image frames won't know
 the size of the paper and cannot break into continuations along
 multiple pages. */
 img {
+  color: #eee;
+  text-align: center;
   display: block;
   position: absolute;
   margin: auto;
   top: 0;
   right: 0;
   bottom: 0;
   left: 0;
 }
--- a/toolkit/content/tests/chrome/test_mousescroll.xul
+++ b/toolkit/content/tests/chrome/test_mousescroll.xul
@@ -68,16 +68,18 @@ https://bugzilla.mozilla.org/show_bug.cg
       <vbox style="width:100px; height:40px; background:black;"/>
   </arrowscrollbox>
 
   <!-- test code goes here -->
   <script type="application/javascript"><![CDATA[
 
 /** Test for Bug 378028 **/
 /*   and for Bug 350471 **/
+var smoothScrollPref = "general.smoothScroll";
+SpecialPowers.setBoolPref(smoothScrollPref, false);
 SimpleTest.waitForExplicitFinish();
 
 /* There are three kinds of scroll events:
     1. line scrolls without hasPixels
     2. line scrolls with hasPixels
     3. pixel scrolls
    Listboxes and arrowscrollboxes (DOM event scrolling) should only react to
    line scrolls and ignore hasPixels.
@@ -225,15 +227,16 @@ function testArrowScrollbox(id)
 }
 
 function runTests()
 {
   testRichListbox("richlistbox", function() {
     testListbox("listbox");
     testArrowScrollbox("hscrollbox");
     testArrowScrollbox("vscrollbox");
+    SpecialPowers.clearUserPref(smoothScrollPref);
     SimpleTest.finish();
   });
 }
 
 window.onload = function() { setTimeout(runTests, 0); };
   ]]></script>
 </window>
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -899,17 +899,17 @@ endif
 # deal with them.
 empty :=
 space = $(empty) $(empty)
 QUOTED_WILDCARD = $(if $(wildcard $(subst $(space),?,$(1))),"$(1)")
 ESCAPE_SPACE = $(subst $(space),\$(space),$(1))
 
 # This variable defines which OpenSSL algorithm to use to 
 # generate checksums for files that we upload
-CHECKSUM_ALGORITHM = 'sha512'
+CHECKSUM_ALGORITHM_PARAM = -d sha512 -d md5 -d sha1
 
 # This variable defines where the checksum file will be located
 CHECKSUM_FILE = "$(DIST)/$(PKG_PATH)/$(CHECKSUMS_FILE_BASENAME).checksums"
 CHECKSUM_FILES = $(CHECKSUM_FILE)
 
 UPLOAD_FILES= \
   $(call QUOTED_WILDCARD,$(DIST)/$(PACKAGE)) \
   $(call QUOTED_WILDCARD,$(INSTALLER_PACKAGE)) \
@@ -936,17 +936,17 @@ UPLOAD_FILES += $(call QUOTED_WILDCARD,$
 UPLOAD_FILES += $(call QUOTED_WILDCARD,$(INSTALLER_PACKAGE).asc)
 endif
 endif
 
 checksum:
 	mkdir -p `dirname $(CHECKSUM_FILE)`
 	@$(PYTHON) $(MOZILLA_DIR)/build/checksums.py \
 		-o $(CHECKSUM_FILE) \
-		-d $(CHECKSUM_ALGORITHM) \
+		$(CHECKSUM_ALGORITHM_PARAM) \
 		-s $(call QUOTED_WILDCARD,$(DIST)) \
 		$(UPLOAD_FILES)
 	@echo "CHECKSUM FILE START"
 	@cat $(CHECKSUM_FILE)
 	@echo "CHECKSUM FILE END"
 	$(SIGN_CHECKSUM_CMD)
 
 
--- a/widget/tests/window_bug478536.xul
+++ b/widget/tests/window_bug478536.xul
@@ -73,19 +73,22 @@ var gTests = [
  { scrollToForward: false, shouldScroll: true },
  { scrollToForward: false, shouldScroll: false }
 ];
 var gCurrentTestIndex = -1;
 var gIgnoreScrollEvent = true;
 
 var gPrefSvc = Components.classes["@mozilla.org/preferences-service;1"].
                getService(Components.interfaces.nsIPrefBranch2);
+const kPrefSmoothScroll = "general.smoothScroll";
 const kPrefNameTimeout = "mousewheel.transaction.timeout";
 const kDefaultTimeout = gPrefSvc.getIntPref(kPrefNameTimeout);
 
+gPrefSvc.setBoolPref(kPrefSmoothScroll, false);
+
 var gTimeout = kDefaultTimeout;
 
 gBody.addEventListener("MozMouseScrollFailed", onMouseScrollFailed, false);
 gBody.addEventListener("MozMouseScrollTransactionTimeout",
                        onTransactionTimeout, false);
 
 function setTimeoutPrefs(aTimeout)
 {
@@ -112,16 +115,17 @@ function onload()
   disableNonTestMouseEvents(true);
   setTimeout(runNextTest, 0);
 }
 
 function onunload()
 {
   resetTimeoutPrefs();
   disableNonTestMouseEvents(false);
+  gPrefSvc.clearUserPref(kPrefSmoothScroll);
   window.opener.wrappedJSObject.SimpleTest.finish();
 }
 
 function finish()
 {
   window.close();
 }
 
--- a/widget/tests/window_wheeltransaction.xul
+++ b/widget/tests/window_wheeltransaction.xul
@@ -105,21 +105,24 @@ var gLitesnEvents = kListenEvent_None;
  * only one timer at one time.  For that, we must store the timer id to this
  * variable.  And the functions which may be called via a timer must clear the
  * current timer by |_clearTimer| function.
  */
 var gTimer;
 
 var gPrefSvc = Components.classes["@mozilla.org/preferences-service;1"].
                getService(Components.interfaces.nsIPrefBranch2);
+const kPrefSmoothScroll = "general.smoothScroll";
 const kPrefNameTimeout = "mousewheel.transaction.timeout";
 const kPrefNameIgnoreMoveDelay = "mousewheel.transaction.ignoremovedelay";
 
 const kDefaultTimeout = gPrefSvc.getIntPref(kPrefNameTimeout);
-const kDefaultIgnoreMoveDelay = gPrefSvc.getIntPref(kPrefNameIgnoreMoveDelay)
+const kDefaultIgnoreMoveDelay = gPrefSvc.getIntPref(kPrefNameIgnoreMoveDelay);
+
+gPrefSvc.setBoolPref(kPrefSmoothScroll, false);
 
 var gTimeout, gIgnoreMoveDelay;
 var gEnoughForTimeout, gEnoughForIgnoreMoveDelay;
 
 function setTimeoutPrefs(aTimeout, aIgnoreMoveDelay)
 {
   gPrefSvc.setIntPref(kPrefNameTimeout, aTimeout);
   gPrefSvc.setIntPref(kPrefNameIgnoreMoveDelay, aIgnoreMoveDelay);
@@ -166,16 +169,17 @@ function finish()
 function onload()
 {
   runNextTestList();
 }
 
 function onunload()
 {
   resetTimeoutPrefs();
+  gPrefSvc.clearUserPref(kPrefSmoothScroll);
   disableNonTestMouseEvents(false);
   window.opener.wrappedJSObject.SimpleTest.finish();
 }
 
 const kSubView1Offset = { x: 20, y: 20 };
 const kSubView2Offset = { x: 20, y: 20 + 100 + 20 };
 const kSubView3Offset = { x: 20, y: 20 + (100 + 20) * 2 };