Restore merge changeset 39a3044823b0, regression fixed upstream in mc
authorBenoit Girard <b56girard@gmail.com>
Mon, 05 Mar 2012 13:09:05 -0500
changeset 91105 17c65d32c7b891e70435561b965b71c355bd28ac
parent 91104 35ff69cdfa91e9ce02a1d7063ad365e40080a7da
child 91106 7c9f942b9becdb29912997dcda0bfe53d78b6451
push id1127
push userlsblakk@mozilla.com
push dateTue, 24 Apr 2012 17:50:26 +0000
treeherdermozilla-aurora@13580e09e879 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone13.0a1
Restore merge changeset 39a3044823b0, regression fixed upstream in mc
b2g/chrome/content/commandUtil.js
b2g/chrome/content/shell.js
b2g/chrome/content/shell.xul
b2g/chrome/jar.mn
browser/app/profile/firefox.js
browser/base/content/sync/progress.xhtml
browser/base/content/test/Makefile.in
browser/base/content/test/browser_contentAreaClick.js
browser/base/content/test/browser_locationBarCommand.js
browser/base/content/utilityOverlay.js
browser/devtools/debugger/debugger-view.js
browser/devtools/debugger/debugger.css
browser/devtools/debugger/debugger.js
browser/devtools/debugger/test/browser_dbg_clean-exit.js
browser/devtools/debugger/test/browser_dbg_debuggerstatement.js
browser/devtools/debugger/test/browser_dbg_propertyview-01.js
browser/devtools/debugger/test/browser_dbg_propertyview-07.js
browser/devtools/debugger/test/browser_dbg_propertyview-08.js
browser/devtools/debugger/test/browser_dbg_script-switching.js
browser/devtools/debugger/test/browser_dbg_select-line.js
browser/devtools/debugger/test/browser_dbg_update-editor-mode.js
browser/devtools/debugger/test/head.js
browser/devtools/highlighter/inspector.html
browser/devtools/highlighter/inspector.jsm
browser/devtools/styleinspector/CssLogic.jsm
browser/devtools/styleinspector/CssRuleView.jsm
browser/devtools/styleinspector/StyleInspector.jsm
browser/devtools/styleinspector/test/Makefile.in
browser/devtools/styleinspector/test/browser_bug_592743_specificity.js
browser/devtools/styleinspector/test/browser_ruleview_editor_changedvalues.js
browser/locales/en-US/chrome/browser/devtools/gclicommands.properties
browser/locales/en-US/chrome/browser/devtools/styleinspector.properties
browser/themes/gnomestripe/devtools/alerticon-warning.png
browser/themes/gnomestripe/devtools/csshtmltree.css
browser/themes/gnomestripe/devtools/debugger.css
browser/themes/gnomestripe/devtools/htmlpanel.css
browser/themes/gnomestripe/inspector.css
browser/themes/gnomestripe/jar.mn
browser/themes/pinstripe/devtools/alerticon-warning.png
browser/themes/pinstripe/devtools/csshtmltree.css
browser/themes/pinstripe/devtools/debugger.css
browser/themes/pinstripe/devtools/htmlpanel.css
browser/themes/pinstripe/inspector.css
browser/themes/pinstripe/jar.mn
browser/themes/winstripe/Toolbar-inverted.png
browser/themes/winstripe/Toolbar.png
browser/themes/winstripe/devtools/alerticon-warning.png
browser/themes/winstripe/devtools/csshtmltree.css
browser/themes/winstripe/devtools/debugger.css
browser/themes/winstripe/devtools/htmlpanel.css
browser/themes/winstripe/inspector.css
browser/themes/winstripe/jar.mn
browser/themes/winstripe/tabbrowser/newtab.png
browser/themes/winstripe/tabview/tabview.png
config/system-headers
configure.in
content/base/public/Element.h
content/base/public/nsContentUtils.h
content/base/public/nsIContent.h
content/base/public/nsIDocument.h
content/base/public/nsINode.h
content/base/src/Makefile.in
content/base/src/nsAttrAndChildArray.cpp
content/base/src/nsAttrAndChildArray.h
content/base/src/nsAttrValue.cpp
content/base/src/nsAttrValue.h
content/base/src/nsCommentNode.cpp
content/base/src/nsContentUtils.cpp
content/base/src/nsDocument.cpp
content/base/src/nsDocument.h
content/base/src/nsGenericDOMDataNode.cpp
content/base/src/nsGenericDOMDataNode.h
content/base/src/nsGenericElement.cpp
content/base/src/nsGenericElement.h
content/base/src/nsLineBreaker.cpp
content/base/src/nsMappedAttributeElement.h
content/base/src/nsMappedAttributes.cpp
content/base/src/nsMappedAttributes.h
content/base/src/nsStyledElement.h
content/base/src/nsTextFragment.cpp
content/base/src/nsTextFragment.h
content/base/src/nsTextNode.h
content/events/src/nsEventListenerManager.cpp
content/events/src/nsEventListenerManager.h
content/html/content/src/nsFormSubmission.cpp
content/html/content/src/nsGenericHTMLElement.h
content/html/content/src/nsGenericHTMLFrameElement.cpp
content/html/content/src/nsGenericHTMLFrameElement.h
content/html/content/src/nsHTMLAnchorElement.cpp
content/html/content/src/nsHTMLAreaElement.cpp
content/html/content/src/nsHTMLDivElement.cpp
content/html/content/src/nsHTMLLinkElement.cpp
content/html/content/src/nsHTMLSpanElement.cpp
content/html/content/test/Makefile.in
content/html/content/test/test_bug615595.html
content/html/document/src/nsHTMLDocument.cpp
content/html/document/src/nsHTMLDocument.h
content/xml/content/src/nsXMLCDATASection.cpp
content/xml/content/src/nsXMLProcessingInstruction.h
content/xml/document/src/nsXMLDocument.cpp
content/xml/document/src/nsXMLDocument.h
dom/base/Navigator.cpp
dom/base/Navigator.h
dom/base/nsDOMMemoryReporter.cpp
dom/base/nsDOMMemoryReporter.h
dom/base/nsGlobalWindow.cpp
dom/base/nsGlobalWindow.h
dom/base/nsIJSEventListener.h
dom/contacts/Makefile.in
dom/plugins/base/npapi.h
dom/plugins/base/npfunctions.h
dom/plugins/base/nsIPluginInstanceOwner.idl
dom/plugins/base/nsJSNPRuntime.cpp
dom/plugins/base/nsNPAPIPlugin.cpp
dom/plugins/base/nsNPAPIPlugin.h
dom/plugins/base/nsNPAPIPluginInstance.cpp
dom/plugins/base/nsNPAPIPluginInstance.h
dom/plugins/base/nsPluginInstanceOwner.cpp
dom/plugins/base/nsPluginInstanceOwner.h
dom/plugins/base/nsPluginNativeWindowGtk2.cpp
dom/plugins/ipc/PPluginInstance.ipdl
dom/plugins/ipc/PPluginModule.ipdl
dom/plugins/ipc/PluginInstanceChild.cpp
dom/plugins/ipc/PluginInstanceChild.h
dom/plugins/ipc/PluginInstanceParent.cpp
dom/plugins/ipc/PluginInstanceParent.h
dom/plugins/ipc/PluginMessageUtils.h
dom/plugins/ipc/PluginModuleChild.cpp
dom/plugins/ipc/PluginModuleChild.h
dom/plugins/ipc/PluginModuleParent.cpp
dom/plugins/test/reftest/plugin-async-update-ref.html
dom/plugins/test/reftest/plugin-asyncbitmap-sanity.html
dom/plugins/test/reftest/plugin-asyncbitmap-update.html
dom/plugins/test/reftest/reftest.list
dom/plugins/test/testplugin/nptest.cpp
dom/plugins/test/testplugin/nptest.h
dom/plugins/test/testplugin/nptest_droid.cpp
dom/plugins/test/testplugin/nptest_gtk2.cpp
dom/plugins/test/testplugin/nptest_macosx.mm
dom/plugins/test/testplugin/nptest_os2.cpp
dom/plugins/test/testplugin/nptest_platform.h
dom/plugins/test/testplugin/nptest_qt.cpp
dom/plugins/test/testplugin/nptest_windows.cpp
dom/src/events/nsJSEventListener.h
gfx/gl/GLContext.cpp
gfx/gl/GLContext.h
gfx/gl/GLContextSymbols.h
gfx/layers/ImageLayers.cpp
gfx/layers/ImageLayers.h
gfx/layers/Layers.cpp
gfx/layers/Layers.h
gfx/layers/basic/BasicLayers.cpp
gfx/layers/d3d10/ImageLayerD3D10.cpp
gfx/layers/d3d10/ImageLayerD3D10.h
gfx/layers/d3d9/ImageLayerD3D9.cpp
gfx/layers/d3d9/ImageLayerD3D9.h
gfx/layers/opengl/ContainerLayerOGL.cpp
gfx/layers/opengl/ImageLayerOGL.cpp
gfx/layers/opengl/LayerManagerOGL.cpp
gfx/layers/opengl/LayerManagerOGL.h
gfx/layers/opengl/ThebesLayerOGL.cpp
gfx/thebes/gfxASurface.cpp
gfx/thebes/gfxASurface.h
gfx/thebes/gfxUtils.cpp
gfx/thebes/gfxUtils.h
image/src/imgLoader.cpp
ipc/glue/CrossProcessMutex.h
ipc/glue/CrossProcessMutex_unimplemented.cpp
ipc/glue/CrossProcessMutex_windows.cpp
ipc/glue/Makefile.in
ipc/testshell/XPCShellEnvironment.cpp
js/jsd/jsd_xpc.cpp
js/public/HashTable.h
js/public/Utility.h
js/src/builtin/MapObject.cpp
js/src/builtin/MapObject.h
js/src/builtin/RegExp.cpp
js/src/config/system-headers
js/src/jit-test/tests/basic/bug730888.js
js/src/jit-test/tests/basic/bug732087.js
js/src/jit-test/tests/collections/Map-constructor-1.js
js/src/jit-test/tests/collections/Map-constructor-2.js
js/src/jit-test/tests/collections/Map-constructor-3.js
js/src/jit-test/tests/collections/Map-constructor-4.js
js/src/jit-test/tests/collections/Map-constructor-5.js
js/src/jit-test/tests/collections/Map-constructor-duplicates.js
js/src/jit-test/tests/collections/Map-constructor-generator-1.js
js/src/jit-test/tests/collections/Map-constructor-generator-2.js
js/src/jit-test/tests/collections/Map-constructor-generator-3.js
js/src/jit-test/tests/collections/Map-constructor-generator-exception.js
js/src/jit-test/tests/collections/Map-delete-size.js
js/src/jit-test/tests/collections/Map-set-size.js
js/src/jit-test/tests/collections/Map-size.js
js/src/jit-test/tests/collections/Map-surfaces-1.js
js/src/jit-test/tests/collections/Map-surfaces-2.js
js/src/jit-test/tests/collections/Set-add-size.js
js/src/jit-test/tests/collections/Set-constructor-1.js
js/src/jit-test/tests/collections/Set-constructor-2.js
js/src/jit-test/tests/collections/Set-constructor-3.js
js/src/jit-test/tests/collections/Set-constructor-generator-1.js
js/src/jit-test/tests/collections/Set-constructor-generator-2.js
js/src/jit-test/tests/collections/Set-delete-size.js
js/src/jit-test/tests/collections/Set-size.js
js/src/jit-test/tests/collections/Set-surfaces-1.js
js/src/jit-test/tests/for-of/array-holes-2.js
js/src/jit-test/tests/for-of/array-holes-3.js
js/src/jit-test/tests/for-of/array-holes-4.js
js/src/jit-test/tests/for-of/array-holes-5.js
js/src/jit-test/tests/for-of/array-holes-6.js
js/src/jit-test/tests/for-of/array-holes-7.js
js/src/jit-test/tests/for-of/array-holes-slow.js
js/src/jsanalyze.cpp
js/src/jsanalyze.h
js/src/jsapi-tests/testIntern.cpp
js/src/jsapi.cpp
js/src/jsapi.h
js/src/jsarray.cpp
js/src/jscntxt.h
js/src/jscompartment.cpp
js/src/jscompartment.h
js/src/jsexn.cpp
js/src/jsfriendapi.cpp
js/src/jsfriendapi.h
js/src/jsgc.cpp
js/src/jsgc.h
js/src/jsiter.cpp
js/src/jsiter.h
js/src/jsnum.cpp
js/src/jsobj.cpp
js/src/jsproxy.cpp
js/src/jspubtd.h
js/src/jsreflect.cpp
js/src/jsstr.cpp
js/src/shell/js.cpp
js/src/shell/jsheaptools.cpp
js/src/tests/js1_8_5/extensions/jstests.list
js/src/tests/js1_8_5/extensions/reflect-parse.js
js/src/tests/js1_8_5/extensions/regress-604781-1.js
js/src/tests/js1_8_5/extensions/regress-604781-2.js
js/src/tests/js1_8_5/extensions/shell.js
js/src/vm/Stack.cpp
js/src/vm/Stack.h
js/xpconnect/shell/xpcshell.cpp
js/xpconnect/src/XPCJSRuntime.cpp
js/xpconnect/src/nsXPConnect.cpp
js/xpconnect/src/xpcprivate.h
layout/base/FrameLayerBuilder.cpp
layout/base/FrameLayerBuilder.h
layout/base/crashtests/727601.html
layout/base/crashtests/crashtests.list
layout/base/nsBidiPresUtils.cpp
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsDisplayList.cpp
layout/base/nsDisplayList.h
layout/base/nsDocumentViewer.cpp
layout/base/nsLayoutDebugger.cpp
layout/base/nsLayoutUtils.cpp
layout/base/nsPresContext.cpp
layout/base/nsPresShell.cpp
layout/build/nsLayoutModule.cpp
layout/build/nsLayoutStatics.cpp
layout/forms/nsComboboxControlFrame.cpp
layout/forms/nsFileControlFrame.cpp
layout/forms/nsGfxCheckboxControlFrame.cpp
layout/forms/nsListControlFrame.cpp
layout/forms/nsTextControlFrame.cpp
layout/generic/TextOverflow.cpp
layout/generic/nsAbsoluteContainingBlock.cpp
layout/generic/nsContainerFrame.cpp
layout/generic/nsFrame.h
layout/generic/nsFrameSetFrame.cpp
layout/generic/nsGfxScrollFrame.cpp
layout/generic/nsImageFrame.cpp
layout/generic/nsImageMap.cpp
layout/generic/nsObjectFrame.cpp
layout/generic/nsSelection.cpp
layout/generic/nsSimplePageSequence.cpp
layout/generic/nsTextFrameThebes.cpp
layout/generic/nsVideoFrame.cpp
layout/generic/punct_marks.x-ccmap
layout/printing/nsPrintEngine.cpp
layout/reftests/svg/smil/sort/sort-additive-1.svg
layout/style/nsCSSRuleProcessor.cpp
layout/style/nsHTMLStyleSheet.cpp
layout/style/nsHTMLStyleSheet.h
layout/style/nsRuleNode.cpp
layout/tables/nsTableCellFrame.cpp
layout/tables/nsTableFrame.cpp
layout/xul/base/src/nsBoxFrame.cpp
layout/xul/base/src/nsBoxObject.cpp
layout/xul/base/src/nsImageBoxFrame.cpp
layout/xul/base/src/nsMenuPopupFrame.cpp
layout/xul/base/src/nsSprocketLayout.cpp
layout/xul/base/src/nsXULPopupManager.cpp
layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
mfbt/Likely.h
mobile/android/base/DoorHangerPopup.java
mobile/android/base/GeckoApp.java
mobile/android/base/GeckoAppShell.java
mobile/android/chrome/content/SelectHelper.js
mobile/android/chrome/content/aboutAddons.js
mobile/android/chrome/content/bindings.xml
mobile/android/chrome/content/browser.js
mobile/android/chrome/jar.mn
mobile/android/themes/core/content.css
mobile/xul/chrome/content/about.xhtml
modules/libpref/src/init/all.js
security/manager/ssl/public/Makefile.in
security/manager/ssl/public/nsINSSVersion.idl
security/manager/ssl/src/Makefile.in
security/manager/ssl/src/nsNSSIOLayer.h
security/manager/ssl/src/nsNSSModule.cpp
security/manager/ssl/src/nsNSSVersion.cpp
security/manager/ssl/src/nsNSSVersion.h
storage/src/mozStorageConnection.cpp
testing/peptest/tests/firefox/test_contextMenu.js
testing/talos/talos.json
toolkit/components/aboutmemory/tests/Makefile.in
toolkit/components/aboutmemory/tests/test_aboutcompartments.xul
toolkit/components/aboutmemory/tests/test_aboutmemory.xul
toolkit/components/aboutmemory/tests/test_aboutmemory2.xul
toolkit/components/aboutmemory/tests/test_memoryReporters.xul
toolkit/components/autocomplete/nsAutoCompleteController.cpp
toolkit/components/autocomplete/nsAutoCompleteController.h
toolkit/components/autocomplete/nsIAutoCompleteSearch.idl
toolkit/components/autocomplete/tests/unit/test_immediate_search.js
toolkit/components/autocomplete/tests/unit/xpcshell.ini
toolkit/components/places/Database.cpp
toolkit/components/places/nsPlacesAutoComplete.js
toolkit/components/telemetry/TelemetryPing.js
toolkit/xre/nsWindowsDllBlocklist.cpp
widget/gonk/nsAppShell.cpp
widget/gonk/nsLookAndFeel.cpp
widget/gonk/nsLookAndFeel.h
xpcom/glue/Mutex.h
xpcom/glue/nsTObserverArray.h
xulrunner/stub/Makefile.in
deleted file mode 100644
--- a/b2g/chrome/content/commandUtil.js
+++ /dev/null
@@ -1,165 +0,0 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
-/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/**
- * Command Updater
- */
-let CommandUpdater = {
-  /**
-   * Gets a controller that can handle a particular command.
-   * @param {string} command
-   *        A command to locate a controller for, preferring controllers that
-   *        show the command as enabled.
-   * @return {object} In this order of precedence:
-   *            - the first controller supporting the specified command
-   *              associated with the focused element that advertises the
-   *              command as ENABLED.
-   *            - the first controller supporting the specified command
-   *              associated with the global window that advertises the
-   *              command as ENABLED.
-   *            - the first controller supporting the specified command
-   *              associated with the focused element.
-   *            - the first controller supporting the specified command
-   *              associated with the global window.
-   */
-  _getControllerForCommand: function(command) {
-    try {
-      let commandDispatcher = top.document.commandDispatcher;
-      let controller = commandDispatcher.getControllerForCommand(command);
-      if (controller && controller.isCommandEnabled(command))
-        return controller;
-    }
-    catch (e) { }
-
-    let controllerCount = window.controllers.getControllerCount();
-    for (let i = 0; i < controllerCount; ++i) {
-      let current = window.controllers.getControllerAt(i);
-      try {
-        if (current.supportsCommand(command) &&
-            current.isCommandEnabled(command))
-          return current;
-      }
-      catch (e) { }
-    }
-    return controller || window.controllers.getControllerForCommand(command);
-  },
-
-  /**
-   * Updates the state of a XUL <command> element for the specified command
-   * depending on its state.
-   * @param {string} command
-   *        The name of the command to update the XUL <command> element for.
-   */
-  updateCommand: function(command) {
-    let enabled = false;
-    try {
-      let controller = this._getControllerForCommand(command);
-      if (controller) {
-        enabled = controller.isCommandEnabled(command);
-      }
-    }
-    catch (ex) { }
-
-    this.enableCommand(command, enabled);
-  },
-
-  /**
-   * Updates the state of a XUL <command> element for the specified command
-   * depending on its state.
-   * @param {string} command
-   *        The name of the command to update the XUL <command> element for.
-   */
-  updateCommands: function(_commands) {
-    let commands = _commands.split(',');
-    for (let command in commands) {
-      this.updateCommand(commands[command]);
-    }
-  },
-
-  /**
-   * Enables or disables a XUL <command> element.
-   * @param {string} command
-   *          The name of the command to enable or disable.
-   * @param {bool} enabled
-   *          true if the command should be enabled, false otherwise.
-   */
-  enableCommand: function(command, enabled) {
-    let element = document.getElementById(command);
-    if (!element)
-      return;
-
-    if (enabled)
-      element.removeAttribute('disabled');
-    else
-      element.setAttribute('disabled', 'true');
-  },
-
-  /**
-   * Performs the action associated with a specified command using the most
-   * relevant controller.
-   * @param {string} command
-   *          The command to perform.
-   */
-  doCommand: function(command) {
-    let controller = this._getControllerForCommand(command);
-    if (!controller)
-      return;
-    controller.doCommand(command);
-  },
-
-  /**
-   * Changes the label attribute for the specified command.
-   * @param {string} command
-   *          The command to update.
-   * @param {string} labelAttribute
-   *          The label value to use.
-   */
-  setMenuValue: function(command, labelAttribute) {
-    let commandNode = top.document.getElementById(command);
-    if (commandNode) {
-      let label = commandNode.getAttribute(labelAttribute);
-      if (label)
-        commandNode.setAttribute('label', label);
-    }
-  },
-
-  /**
-   * Changes the accesskey attribute for the specified command.
-   * @param {string} command
-   *          The command to update.
-   * @param {string} valueAttribute
-   *          The value attribute to use.
-   */
-  setAccessKey: function(command, valueAttribute) {
-    let commandNode = top.document.getElementById(command);
-    if (commandNode) {
-      let value = commandNode.getAttribute(valueAttribute);
-      if (value)
-        commandNode.setAttribute('accesskey', value);
-    }
-  },
-
-  /**
-   * Inform all the controllers attached to a node that an event has occurred
-   * (e.g. the tree controllers need to be informed of blur events so that they
-   * can change some of the menu items back to their default values)
-   * @param  {node} node
-   *          The node receiving the event.
-   * @param  {event} event
-   *          The event.
-   */
-  onEvent: function(node, event) {
-    let numControllers = node.controllers.getControllerCount();
-    let controller;
-
-    for (let i = 0; i < numControllers; i++) {
-      controller = node.controllers.getControllerAt(i);
-      if (controller)
-        controller.onEvent(event);
-    }
-  }
-};
-
--- a/b2g/chrome/content/shell.js
+++ b/b2g/chrome/content/shell.js
@@ -28,22 +28,26 @@ XPCOMUtils.defineLazyGetter(Services, 's
            .getService(Ci.nsIStyleSheetService);
 });
 
 XPCOMUtils.defineLazyGetter(Services, 'idle', function() {
   return Cc['@mozilla.org/widget/idleservice;1']
            .getService(Ci.nsIIdleService);
 });
 
-XPCOMUtils.defineLazyServiceGetter(Services, 'fm', function(){
-  return Cc['@mozilla.org/focus-managr;1']
+XPCOMUtils.defineLazyGetter(Services, 'audioManager', function() {
+  return Cc['@mozilla.org/telephony/audiomanager;1']
+           .getService(Ci.nsIAudioManager);
+});
+
+XPCOMUtils.defineLazyServiceGetter(Services, 'fm', function() {
+  return Cc['@mozilla.org/focus-manager;1']
            .getService(Ci.nsFocusManager);
 });
 
-
 #ifndef MOZ_WIDGET_GONK
 // In order to use http:// scheme instead of file:// scheme
 // (that is much more restricted) the following code kick-off
 // a local http server listening on http://127.0.0.1:7777 and
 // http://localhost:7777.
 function startupHttpd(baseDir, port) {
   const httpdURL = 'chrome://browser/content/httpd.js';
   let httpd = {};
@@ -69,19 +73,16 @@ function addPermissions(urls) {
 
     permissions.forEach(function(permission) {
       Services.perms.add(uri, permission, allow);
     });
   });
 }
 
 var shell = {
-  // FIXME/bug 678695: this should be a system setting
-  preferredScreenBrightness: 1.0,
-  
   isDebug: false,
 
   get contentBrowser() {
     delete this.contentBrowser;
     return this.contentBrowser = document.getElementById('homescreen');
   },
 
   get homeURL() {
@@ -106,23 +107,33 @@ var shell = {
 
   start: function shell_init() {
     let homeURL = this.homeURL;
     if (!homeURL) {
       let msg = 'Fatal error during startup: [No homescreen found]';
       return alert(msg);
     }
 
-    window.controllers.appendController(this);
-    window.addEventListener('keypress', this);
+    ['keydown', 'keypress', 'keyup'].forEach((function listenKey(type) {
+      window.addEventListener(type, this, false, true);
+      window.addEventListener(type, this, true, true);
+    }).bind(this));
+
     window.addEventListener('MozApplicationManifest', this);
-    window.addEventListener("AppCommand", this);
     window.addEventListener('mozfullscreenchange', this);
     this.contentBrowser.addEventListener('load', this, true);
 
+    // Until the volume can be set from the content side, set it to a
+    // a specific value when the device starts. This way the front-end
+    // can display a notification when the volume change and show a volume
+    // level modified from this point.
+    try {
+      Services.audioManager.masterVolume = 0.5;
+    } catch(e) {}
+
     try {
       Services.io.offline = false;
 
       let fileScheme = 'file://';
       if (homeURL.substring(0, fileScheme.length) == fileScheme) {
 #ifndef MOZ_WIDGET_GONK
         homeURL = homeURL.replace(fileScheme, '');
 
@@ -154,128 +165,116 @@ var shell = {
     }
 
     let browser = this.contentBrowser;
     browser.homePage = homeURL;
     browser.goHome();
   },
 
   stop: function shell_stop() {
-    window.controllers.removeController(this);
-    window.removeEventListener('keypress', this);
     window.removeEventListener('MozApplicationManifest', this);
-    window.removeEventListener('AppCommand', this);
-  },
-
-  supportsCommand: function shell_supportsCommand(cmd) {
-    let isSupported = false;
-    switch (cmd) {
-      case 'cmd_close':
-        isSupported = true;
-        break;
-      default:
-        isSupported = false;
-        break;
-    }
-    return isSupported;
-  },
-
-  isCommandEnabled: function shell_isCommandEnabled(cmd) {
-    return true;
-  },
-
-  doCommand: function shell_doCommand(cmd) {
-    switch (cmd) {
-      case 'cmd_close':
-        content.postMessage('appclose', '*');
-        break;
-    }
+    window.removeEventListener('mozfullscreenchange', this);
   },
 
   toggleDebug: function shell_toggleDebug() {
     this.isDebug = !this.isDebug;
 
     if (this.isDebug) {
       Services.prefs.setBoolPref("layers.acceleration.draw-fps", true);
       Services.prefs.setBoolPref("nglayout.debug.paint_flashing", true);
     } else {
       Services.prefs.setBoolPref("layers.acceleration.draw-fps", false);
       Services.prefs.setBoolPref("nglayout.debug.paint_flashing", false);
     }
   },
  
-  changeVolume: function shell_changeVolume(aDelta) {
-    let audioManager = Cc["@mozilla.org/telephony/audiomanager;1"].getService(Ci.nsIAudioManager);
-
+  changeVolume: function shell_changeVolume(delta) {
     let steps = 10;
     try {
       steps = Services.prefs.getIntPref("media.volume.steps");
       if (steps <= 0)
         steps = 1;
     } catch(e) {}
 
-    let volume = audioManager.masterVolume + aDelta / steps;
+    let audioManager = Services.audioManager;
+    if (!audioManager)
+      return;
+
+    let volume = audioManager.masterVolume + delta / steps;
     if (volume > 1)
       volume = 1;
     if (volume < 0)
       volume = 0;
     audioManager.masterVolume = volume;
   },
 
+  forwardKeyToHomescreen: function shell_forwardKeyToHomescreen(evt) {
+    let generatedEvent = content.document.createEvent('KeyboardEvent');
+    generatedEvent.initKeyEvent(evt.type, true, true, evt.view, evt.ctrlKey,
+                                evt.altKey, evt.shiftKey, evt.metaKey,
+                                evt.keyCode, evt.charCode);
+
+    content.dispatchEvent(generatedEvent);
+  },
+
   handleEvent: function shell_handleEvent(evt) {
     switch (evt.type) {
+      case 'keydown':
+      case 'keyup':
       case 'keypress':
-        switch (evt.keyCode) {
-          case evt.DOM_VK_HOME:
-            this.sendEvent(content, 'home');
-            break;
-          case evt.DOM_VK_SLEEP:
-            this.toggleScreen();
+        // If the home key is pressed, always forward it to the homescreen
+        if (evt.eventPhase == evt.CAPTURING_PHASE) {
+          if (evt.keyCode == evt.VK_DOM_HOME) {
+            window.setTimeout(this.forwardKeyToHomescreen, 0, evt);
+            evt.preventDefault();
+            evt.stopPropagation();
+          } 
+          return;
+        }
+
+        // If one of the other keys is used in an application and is
+        // cancelled via preventDefault, do nothing.
+        let homescreen = (evt.target.ownerDocument.defaultView == content);
+        if (!homescreen && evt.defaultPrevented)
+          return;
 
-            let details = {
-              'enabled': screen.mozEnabled
-            };
-            this.sendEvent(content, 'sleep', details);
-            break;
-          case evt.DOM_VK_ESCAPE:
-            if (evt.defaultPrevented)
-              return;
-            this.doCommand('cmd_close');
-            break;
-        }
-        break;
-      case 'AppCommand':
-        switch (evt.command) {
-          case 'Menu':
-            if (Services.prefs.getBoolPref('b2g.keys.menu.enabled'))
-              this.sendEvent(content, 'menu');
-            break;
-          case 'Search':
-            if (Services.prefs.getBoolPref('b2g.keys.search.enabled'))
-              this.toggleDebug();
-            break;
-          case 'VolumeUp':
-            this.changeVolume(1);
-            break;
-          case 'VolumeDown':
-            this.changeVolume(-1);
-            break;
+        // If one of the other keys is used in an application and is
+        // not used forward it to the homescreen
+        if (!homescreen)
+          window.setTimeout(this.forwardKeyToHomescreen, 0, evt);
+
+        // For debug purposes and because some of the APIs are not yet exposed
+        // to the content, let's react on some of the keyup events.
+        if (evt.type == 'keyup') {
+          switch (evt.keyCode) {
+            case evt.DOM_VK_F5:
+              if (Services.prefs.getBoolPref('b2g.keys.search.enabled'))
+                this.toggleDebug();
+              break;
+  
+            case evt.DOM_VK_PAGE_DOWN:
+              this.changeVolume(-1);
+              break;
+  
+            case evt.DOM_VK_PAGE_UP:
+              this.changeVolume(1);
+              break;
+          }
         }
         break;
 
       case 'mozfullscreenchange':
         // When the screen goes fullscreen make sure to set the focus to the
         // main window so noboby can prevent the ESC key to get out fullscreen
         // mode
         if (document.mozFullScreen)
           Services.fm.focusedWindow = window;
         break;
       case 'load':
         this.contentBrowser.removeEventListener('load', this, true);
-        this.turnScreenOn();
 
         let chromeWindow = window.QueryInterface(Ci.nsIDOMChromeWindow);
         chromeWindow.browserDOMWindow = new nsBrowserAccess();
 
         this.sendEvent(window, 'ContentStart');
         break;
       case 'MozApplicationManifest':
         try {
@@ -312,39 +311,25 @@ var shell = {
         }
         break;
     }
   },
   sendEvent: function shell_sendEvent(content, type, details) {
     let event = content.document.createEvent('CustomEvent');
     event.initCustomEvent(type, true, true, details ? details : {});
     content.dispatchEvent(event);
-  },
-  toggleScreen: function shell_toggleScreen() {
-    if (screen.mozEnabled)
-      this.turnScreenOff();
-    else
-      this.turnScreenOn();
-  },
-  turnScreenOff: function shell_turnScreenOff() {
-    screen.mozEnabled = false;
-    screen.mozBrightness = 0.0;
-  },
-  turnScreenOn: function shell_turnScreenOn() {
-    screen.mozEnabled = true;
-    screen.mozBrightness = this.preferredScreenBrightness;
   }
 };
 
 (function PowerManager() {
   let idleHandler = {
     observe: function(subject, topic, time) {
       if (topic === "idle") {
         // TODO: Check wakelock status. See bug 697132.
-        shell.turnScreenOff();
+        screen.mozEnabled = false;
       }
     },
   }
   let idleTimeout = Services.prefs.getIntPref("power.screen.timeout");
   if (idleTimeout) {
     Services.idle.addIdleObserver(idleHandler, idleTimeout);
   }
 })();
--- a/b2g/chrome/content/shell.xul
+++ b/b2g/chrome/content/shell.xul
@@ -10,28 +10,23 @@
         windowtype="navigator:browser"
 #ifdef ANDROID
         sizemode="fullscreen"
 #endif
         style="background: black; overflow: hidden;"
         onload="shell.start();"
         onunload="shell.stop();">
 
-  <script type="application/javascript" src="chrome://browser/content/commandUtil.js"/>
   <script type="application/javascript" src="chrome://browser/content/shell.js"/>
 #ifndef MOZ_TOUCH
   <script type="application/javascript" src="chrome://browser/content/touch.js"/>
 #endif
 #ifndef MOZ_WIDGET_GONK
   <script type="application/javascript" src="chrome://browser/content/httpd.js"/>
 #endif
 
-  <commandset id="mainCommandSet">
-    <command id="cmd_close" oncommand="CommandUpdater.doCommand(this.id);"/>
-  </commandset>
-
   <browser id="homescreen"
            type="content-primary"
            flex="1"
            style="overflow: hidden;"
            src="data:text/html,%3C!DOCTYPE html>%3Cbody style='background:black;'>"/>
 </window>
 
--- a/b2g/chrome/jar.mn
+++ b/b2g/chrome/jar.mn
@@ -4,22 +4,21 @@ chrome.jar:
 % content branding %content/branding/
 % content browser %content/
 
 * content/shell.xul                     (content/shell.xul)
 * content/shell.js                      (content/shell.js)
 #ifndef MOZ_TOUCH
   content/touch.js                      (content/touch.js)
 #endif
-  content/commandUtil.js                (content/commandUtil.js)
 #ifndef MOZ_WIDGET_GONK
   content/httpd.js                      (content/httpd.js)
 #endif
   content/webapi.js                     (content/webapi.js)
   content/content.css                   (content/content.css)
 
 % override chrome://global/content/netError.xhtml chrome://browser/content/netError.xhtml
 % override chrome://global/skin/netError.css chrome://browser/content/netError.css
   content/netError.xhtml                (content/netError.xhtml)
   content/netError.css                  (content/netError.css)
   content/images/errorpage-larry-black.png (content/images/errorpage-larry-black.png)
   content/images/errorpage-larry-white.png (content/images/errorpage-larry-white.png)
-  content/images/errorpage-warning.png (content/images/errorpage-warning.png)
\ No newline at end of file
+  content/images/errorpage-warning.png (content/images/errorpage-warning.png)
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -315,16 +315,18 @@ pref("browser.urlbar.match.url", "@");
 //          64: javascript, 128: tabs
 // E.g., 0 = show all results (no filtering), 1 = only visited pages in history,
 // 2 = only bookmarks, 3 = visited bookmarks, 1+16 = history matching in the url
 pref("browser.urlbar.default.behavior", 0);
 
 pref("browser.urlbar.formatting.enabled", true);
 pref("browser.urlbar.trimURLs", true);
 
+pref("browser.altClickSave", false);
+
 // Number of milliseconds to wait for the http headers (and thus
 // the Content-Disposition filename) before giving up and falling back to 
 // picking a filename without that info in hand so that the user sees some
 // feedback from their action.
 pref("browser.download.saveLinkAsFilenameTimeout", 4000);
 
 pref("browser.download.useDownloadDir", true);
 
--- a/browser/base/content/sync/progress.xhtml
+++ b/browser/base/content/sync/progress.xhtml
@@ -43,32 +43,35 @@
     "DTD/xhtml1-strict.dtd">
   %htmlDTD;
   <!ENTITY % syncProgressDTD
     SYSTEM "chrome://browser/locale/syncProgress.dtd">
     %syncProgressDTD;
   <!ENTITY % syncSetupDTD
     SYSTEM "chrome://browser/locale/syncSetup.dtd">
     %syncSetupDTD;
+  <!ENTITY % globalDTD 
+    SYSTEM "chrome://global/locale/global.dtd">
+    %globalDTD;
 ]>
 
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <title>&syncProgress.pageTitle;</title>
 
     <link rel="stylesheet" type="text/css" media="all"
           href="chrome://browser/skin/syncProgress.css"/>
 
     <link rel="icon" type="image/png" id="favicon"
           href="chrome://browser/skin/sync-16.png"/>
 
     <script type="text/javascript;version=1.8"
             src="chrome://browser/content/sync/progress.js"/>
   </head>
-  <body onload="onLoad(event)" onunload="onUnload(event)">
+  <body onload="onLoad(event)" onunload="onUnload(event)" dir="&locale.dir;">
     <title>&setup.successPage.title;</title>
     <div id="floatingBox" class="main-content">
       <div id="title">
         <h1>&setup.successPage.title;</h1>
       </div>
       <div id="successLogo">
         <img id="brandSyncLogo" src="chrome://browser/skin/sync-128.png" alt="&syncProgress.logoAltText;" />
       </div>
--- a/browser/base/content/test/Makefile.in
+++ b/browser/base/content/test/Makefile.in
@@ -88,17 +88,16 @@ endif
 #
 # browser_sanitizeDialog_treeView.js is disabled until the tree view is added
 # back to the clear recent history dialog (sanitize.xul), if it ever is (bug
 # 480169)
 
 # browser_drag.js is disabled, as it needs to be updated for the new behavior from bug 320638.
 
 # browser_bug321000.js is disabled because newline handling is shaky (bug 592528)
-# browser_urlbarAutoFillTrimURLs.js is disabled till bug 720792 is fixed
 
 _BROWSER_FILES = \
                  head.js \
                  browser_typeAheadFind.js \
                  browser_keywordSearch.js \
                  browser_allTabsPanel.js \
                  browser_alltabslistener.js \
                  browser_bug304198.js \
@@ -218,16 +217,17 @@ endif
                  browser_scope.js \
                  browser_selectTabAtIndex.js \
                  browser_tab_dragdrop.js \
                  browser_tab_dragdrop2.js \
                  browser_tab_dragdrop2_frame1.xul \
                  browser_tabfocus.js \
                  browser_tabs_isActive.js \
                  browser_tabs_owner.js \
+                 browser_urlbarAutoFillTrimURLs.js \
                  browser_urlbarCopying.js \
                  browser_urlbarEnter.js \
                  browser_urlbarRevert.js \
                  browser_urlbarTrimURLs.js \
                  browser_urlHighlight.js \
                  browser_visibleFindSelection.js \
                  browser_visibleTabs.js \
                  browser_visibleTabs_contextMenu.js \
--- a/browser/base/content/test/browser_contentAreaClick.js
+++ b/browser/base/content/test/browser_contentAreaClick.js
@@ -68,29 +68,37 @@ let gTests = [
     expectedInvokedMethods: [ "urlSecurityCheck", "openLinkIn" ],
     preventDefault: true,
   },
 
   // The next test was once handling feedService.forcePreview().  Now it should
   // just be like Alt click.
   {
     desc: "Shift+Alt left click",
-    setup: function() {},
-    clean: function() {},
+    setup: function() {
+      gPrefService.setBoolPref("browser.altClickSave", true);
+    },
+    clean: function() {
+      gPrefService.clearUserPref("browser.altClickSave"); 
+    },
     event: { shiftKey: true,
              altKey: true },
     targets: [ "commonlink", "maplink" ],
     expectedInvokedMethods: [ "gatherTextUnder", "saveURL" ],
     preventDefault: true,
   },
 
   {
     desc: "Shift+Alt left click on XLinks",
-    setup: function() {},
-    clean: function() {},
+    setup: function() {
+      gPrefService.setBoolPref("browser.altClickSave", true);
+    },
+    clean: function() {
+      gPrefService.clearUserPref("browser.altClickSave"); 
+    },
     event: { shiftKey: true,
              altKey: true },
     targets: [ "mathxlink", "svgxlink"],
     expectedInvokedMethods: [ "saveURL" ],
     preventDefault: true,
   },
 
   {
@@ -100,28 +108,36 @@ let gTests = [
     event: { shiftKey: true },
     targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ],
     expectedInvokedMethods: [ "urlSecurityCheck", "openLinkIn" ],
     preventDefault: true,
   },
 
   {
     desc: "Alt click",
-    setup: function() {},
-    clean: function() {},
+    setup: function() {
+      gPrefService.setBoolPref("browser.altClickSave", true);
+    },
+    clean: function() {
+      gPrefService.clearUserPref("browser.altClickSave"); 
+    },
     event: { altKey: true },
     targets: [ "commonlink", "maplink" ],
     expectedInvokedMethods: [ "gatherTextUnder", "saveURL" ],
     preventDefault: true,
   },
 
   {
     desc: "Alt click on XLinks",
-    setup: function() {},
-    clean: function() {},
+    setup: function() {
+      gPrefService.setBoolPref("browser.altClickSave", true);
+    },
+    clean: function() {
+      gPrefService.clearUserPref("browser.altClickSave"); 
+    },
     event: { altKey: true },
     targets: [ "mathxlink", "svgxlink" ],
     expectedInvokedMethods: [ "saveURL" ],
     preventDefault: true,
   },
 
   {
     desc: "Panel click",
@@ -144,39 +160,33 @@ let gTests = [
   },
 
   {
     desc: "Simple middle click openwin",
     setup: function() {
       gPrefService.setBoolPref("browser.tabs.opentabfor.middleclick", false);
     },
     clean: function() {
-      try {
-        gPrefService.clearUserPref("browser.tabs.opentabfor.middleclick");
-      } catch(ex) {}
+      gPrefService.clearUserPref("browser.tabs.opentabfor.middleclick");
     },
     event: { button: 1 },
     targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ],
     expectedInvokedMethods: [ "urlSecurityCheck", "openLinkIn" ],
     preventDefault: true,
   },
 
   {
     desc: "Middle mouse paste",
     setup: function() {
       gPrefService.setBoolPref("middlemouse.contentLoadURL", true);
       gPrefService.setBoolPref("general.autoScroll", false);
     },
     clean: function() {
-      try {
-        gPrefService.clearUserPref("middlemouse.contentLoadURL");
-      } catch(ex) {}
-      try {
-        gPrefService.clearUserPref("general.autoScroll");
-      } catch(ex) {}
+      gPrefService.clearUserPref("middlemouse.contentLoadURL");
+      gPrefService.clearUserPref("general.autoScroll");
     },
     event: { button: 1 },
     targets: [ "emptylink" ],
     expectedInvokedMethods: [ "middleMousePaste" ],
     preventDefault: true,
   },
 
 ];
--- a/browser/base/content/test/browser_locationBarCommand.js
+++ b/browser/base/content/test/browser_locationBarCommand.js
@@ -4,16 +4,22 @@
 const TEST_VALUE = "example.com";
 const START_VALUE = "example.org";
 
 let gFocusManager = Cc["@mozilla.org/focus-manager;1"].
                     getService(Ci.nsIFocusManager);
 
 function test() {
   waitForExplicitFinish();
+
+  registerCleanupFunction(function () {
+    Services.prefs.clearUserPref("browser.altClickSave");
+  });
+  Services.prefs.setBoolPref("browser.altClickSave", true);
+
   runAltLeftClickTest();
 }
 
 // Monkey patch saveURL to avoid dealing with file save code paths
 var oldSaveURL = saveURL;
 saveURL = function() {
   ok(true, "SaveURL was called");
   is(gURLBar.value, "", "Urlbar reverted to original value");
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -142,17 +142,17 @@ function whereToOpenLink( e, ignoreButto
 
 #ifdef XP_MACOSX
   if (meta || (middle && middleUsesTabs))
 #else
   if (ctrl || (middle && middleUsesTabs))
 #endif
     return shift ? "tabshifted" : "tab";
 
-  if (alt)
+  if (alt && getBoolPref("browser.altClickSave", false))
     return "save";
 
   if (shift || (middle && !middleUsesTabs))
     return "window";
 
   return "current";
 }
 
--- a/browser/devtools/debugger/debugger-view.js
+++ b/browser/devtools/debugger/debugger-view.js
@@ -145,45 +145,45 @@ DebuggerView.Stackframes = {
 
   /**
    * Adds a frame to the stackframes container.
    * If the frame already exists (was previously added), null is returned.
    * Otherwise, the newly created element is returned.
    *
    * @param number aDepth
    *        The frame depth specified by the debugger.
-   * @param string aFrameIdText
-   *        The id to be displayed in the list.
    * @param string aFrameNameText
    *        The name to be displayed in the list.
+   * @param string aFrameDetailsText
+   *        The details to be displayed in the list.
    * @return object
    *         The newly created html node representing the added frame.
    */
-  addFrame: function DVF_addFrame(aDepth, aFrameIdText, aFrameNameText) {
+  addFrame: function DVF_addFrame(aDepth, aFrameNameText, aFrameDetailsText) {
     // make sure we don't duplicate anything
     if (document.getElementById("stackframe-" + aDepth)) {
       return null;
     }
 
     let frame = document.createElement("div");
-    let frameId = document.createElement("span");
     let frameName = document.createElement("span");
+    let frameDetails = document.createElement("span");
 
     // create a list item to be added to the stackframes container
     frame.id = "stackframe-" + aDepth;
     frame.className = "dbg-stackframe list-item";
 
-    // this list should display the id and name of the frame
-    frameId.className = "dbg-stackframe-id";
+    // this list should display the name and details for the frame
     frameName.className = "dbg-stackframe-name";
-    frameId.appendChild(document.createTextNode(aFrameIdText));
+    frameDetails.className = "dbg-stackframe-details";
     frameName.appendChild(document.createTextNode(aFrameNameText));
+    frameDetails.appendChild(document.createTextNode(aFrameDetailsText));
 
-    frame.appendChild(frameId);
     frame.appendChild(frameName);
+    frame.appendChild(frameDetails);
 
     this._frames.appendChild(frame);
 
     // return the element for later use if necessary
     return frame;
   },
 
   /**
@@ -1069,25 +1069,41 @@ DebuggerView.Scripts = {
   },
 
   /**
    * Checks whether the script with the specified URL is among the scripts
    * known to the debugger and shown in the list.
    *
    * @param string aUrl
    *        The script URL.
+   * @return boolean
    */
   contains: function DVS_contains(aUrl) {
     if (this._scripts.getElementsByAttribute("value", aUrl).length > 0) {
       return true;
     }
     return false;
   },
 
   /**
+   * Checks whether the script with the specified label is among the scripts
+   * known to the debugger and shown in the list.
+   *
+   * @param string aLabel
+   *        The script label.
+   * @return boolean
+   */
+  containsLabel: function DVS_containsLabel(aLabel) {
+    if (this._scripts.getElementsByAttribute("label", aLabel).length > 0) {
+      return true;
+    }
+    return false;
+  },
+
+  /**
    * Checks whether the script with the specified URL is selected in the list.
    *
    * @param string aUrl
    *        The script URL.
    */
   isSelected: function DVS_isSelected(aUrl) {
     if (this._scripts.selectedItem &&
         this._scripts.selectedItem.value == aUrl) {
@@ -1104,40 +1120,40 @@ DebuggerView.Scripts = {
    */
    selectScript: function DVS_selectScript(aUrl) {
     for (let i = 0; i < this._scripts.itemCount; i++) {
       if (this._scripts.getItemAtIndex(i).value == aUrl) {
         this._scripts.selectedIndex = i;
         break;
       }
     }
-   },
+  },
 
   /**
    * Adds a script to the scripts container.
    * If the script already exists (was previously added), null is returned.
    * Otherwise, the newly created element is returned.
    *
-   * @param string aUrl
-   *        The script url.
+   * @param string aLabel
+   *        The simplified script location to be shown.
    * @param string aScript
    *        The source script.
-   * @param string aScriptNameText
-   *        Optional, title displayed instead of url.
    * @return object
    *         The newly created html node representing the added script.
    */
-  addScript: function DVS_addScript(aUrl, aSource, aScriptNameText) {
+  addScript: function DVS_addScript(aLabel, aScript) {
     // make sure we don't duplicate anything
-    if (this.contains(aUrl)) {
+    if (this.containsLabel(aLabel)) {
       return null;
     }
 
-    let script = this._scripts.appendItem(aScriptNameText || aUrl, aUrl);
-    script.setUserData("sourceScript", aSource, null);
+    let script = this._scripts.appendItem(aLabel, aScript.url);
+    script.setAttribute("tooltiptext", aScript.url);
+    script.setUserData("sourceScript", aScript, null);
+
     this._scripts.selectedItem = script;
     return script;
   },
 
   /**
    * Returns the list of URIs for scripts in the page.
    */
   scriptLocations: function DVS_scriptLocations() {
--- a/browser/devtools/debugger/debugger.css
+++ b/browser/devtools/debugger/debugger.css
@@ -62,16 +62,36 @@
 #stack {
   width: 200px;
 }
 
 #stackframes {
   overflow: auto;
 }
 
+.dbg-stackframe {
+  display: block;
+}
+
+.dbg-stackframe-name {
+  float: left;
+}
+
+.dbg-stackframe-details {
+  float: right;
+}
+
+.dbg-stackframe-name:-moz-locale-dir(rtl) {
+  float: right;
+}
+
+.dbg-stackframe-details:-moz-locale-dir(rtl) {
+  float: left;
+}
+
 /**
  * Properties elements
  */
 
 #properties {
   width: 250px;
 }
 
--- a/browser/devtools/debugger/debugger.js
+++ b/browser/devtools/debugger/debugger.js
@@ -365,20 +365,22 @@ var StackFrames = {
   /**
    * Adds the specified stack frame to the list.
    *
    * @param Debugger.Frame aFrame
    *        The new frame to add.
    */
   _addFramePanel: function SF_addFramePanel(aFrame) {
     let depth = aFrame.depth;
-    let idText = "#" + aFrame.depth + " ";
-    let nameText = this._frameTitle(aFrame);
+    let label = SourceScripts._getScriptLabel(aFrame.where.url);
 
-    let panel = DebuggerView.Stackframes.addFrame(depth, idText, nameText);
+    let startText = this._frameTitle(aFrame);
+    let endText = label + ":" + aFrame.where.line;
+
+    let panel = DebuggerView.Stackframes.addFrame(depth, startText, endText);
 
     if (panel) {
       panel.stackFrame = aFrame;
     }
   },
 
   /**
    * Loads more stack frames from the debugger server cache.
@@ -392,17 +394,17 @@ var StackFrames = {
    * Create a textual representation for the stack frame specified, for
    * displaying in the stack frame list.
    *
    * @param Debugger.Frame aFrame
    *        The stack frame to label.
    */
   _frameTitle: function SF_frameTitle(aFrame) {
     if (aFrame.type == "call") {
-      return aFrame["calleeName"] ? aFrame["calleeName"] + "()" : "(anonymous)";
+      return aFrame["calleeName"] ? aFrame["calleeName"] : "(anonymous)";
     }
 
     return "(" + aFrame.type + ")";
   }
 };
 
 StackFrames.onPaused = StackFrames.onPaused.bind(StackFrames);
 StackFrames.onFrames = StackFrames.onFrames.bind(StackFrames);
@@ -411,31 +413,33 @@ StackFrames.onClick = StackFrames.onClic
 
 /**
  * Keeps the source script list up-to-date, using the thread client's
  * source script cache.
  */
 var SourceScripts = {
   pageSize: 25,
   activeThread: null,
+  _labelsCache: null,
 
   /**
    * Watch a given thread client.
    * @param object aThreadClient
    *        The thread client.
    * @param function aCallback
    *        The next function in the initialization sequence.
    */
   connect: function SS_connect(aThreadClient, aCallback) {
     DebuggerView.Scripts.addChangeListener(this.onChange);
 
     this.activeThread = aThreadClient;
     aThreadClient.addListener("paused", this.onPaused);
     aThreadClient.addListener("scriptsadded", this.onScripts);
     aThreadClient.addListener("scriptscleared", this.onScriptsCleared);
+    this.clearLabelsCache();
     this.onScriptsCleared();
     aCallback && aCallback();
   },
 
   /**
    * Disconnect from the client.
    */
   disconnect: function TS_disconnect() {
@@ -504,36 +508,96 @@ var SourceScripts = {
       if (/javascript/.test(aContentType)) {
         window.editor.setMode(SourceEditor.MODES.JAVASCRIPT);
       } else {
         window.editor.setMode(SourceEditor.MODES.HTML);
       }
       return;
     }
 
-    let url = aUrl;
-    // Trim the query part.
-    let q = url.indexOf('?');
-    if (q > -1) {
-      url = url.slice(0, q);
-    }
-
-    if (url.slice(-3) == ".js") {
+    if (this._trimUrlQuery(aUrl).slice(-3) == ".js") {
       window.editor.setMode(SourceEditor.MODES.JAVASCRIPT);
     } else {
       window.editor.setMode(SourceEditor.MODES.HTML);
     }
   },
 
   /**
+   * Trims the query part of a url string, if necessary.
+   *
+   * @param string aUrl
+   *        The script url.
+   * @return string
+   */
+  _trimUrlQuery: function SS_trimUrlQuery(aUrl) {
+    let q = aUrl.indexOf('?');
+    if (q > -1) {
+      return aUrl.slice(0, q);
+    }
+    return aUrl;
+  },
+
+  /**
+   * Gets a unique, simplified label from a script url.
+   * ex: a). ici://some.address.com/random/subrandom/
+   *     b). ni://another.address.org/random/subrandom/page.html
+   *     c). san://interesting.address.gro/random/script.js
+   *     d). si://interesting.address.moc/random/another/script.js
+   * =>
+   *     a). subrandom/
+   *     b). page.html
+   *     c). script.js
+   *     d). another/script.js
+   *
+   * @param string aUrl
+   *        The script url.
+   * @param string aHref
+   *        The content location href to be used. If unspecified, it will
+   *        defalult to debugged panrent window location.
+   * @return string
+   *         The simplified label.
+   */
+  _getScriptLabel: function SS_getScriptLabel(aUrl, aHref) {
+    let url = this._trimUrlQuery(aUrl);
+
+    if (this._labelsCache[url]) {
+      return this._labelsCache[url];
+    }
+
+    let href = aHref || window.parent.content.location.href;
+    let pathElements = url.split("/");
+    let label = pathElements.pop() || (pathElements.pop() + "/");
+
+    // if the label as a leaf name is alreay present in the scripts list
+    if (DebuggerView.Scripts.containsLabel(label)) {
+      label = url.replace(href.substring(0, href.lastIndexOf("/") + 1), "");
+
+      // if the path/to/script is exactly the same, we're in different domains
+      if (DebuggerView.Scripts.containsLabel(label)) {
+        label = url;
+      }
+    }
+
+    return this._labelsCache[url] = label;
+  },
+
+  /**
+   * Clears the labels cache, populated by SS_getScriptLabel().
+   * This should be done every time the content location changes.
+   */
+  clearLabelsCache: function SS_clearLabelsCache() {
+    this._labelsCache = {};
+  },
+
+  /**
    * Add the specified script to the list and display it in the editor if the
    * editor is empty.
    */
   _addScript: function SS_addScript(aScript) {
-    DebuggerView.Scripts.addScript(aScript.url, aScript);
+    DebuggerView.Scripts.addScript(this._getScriptLabel(aScript.url), aScript);
 
     if (window.editor.getCharCount() == 0) {
       this._showScript(aScript);
     }
   },
 
   /**
    * Load the editor with the script text if available, otherwise fire an event
--- a/browser/devtools/debugger/test/browser_dbg_clean-exit.js
+++ b/browser/devtools/debugger/test/browser_dbg_clean-exit.js
@@ -5,19 +5,17 @@
 
 // Test that closing a tab with the debugger in a paused state exits cleanly.
 
 var gPane = null;
 var gTab = null;
 var gDebuggee = null;
 var gDebugger = null;
 
-const DEBUGGER_TAB_URL = "http://example.com/browser/browser/devtools/" +
-                         "debugger/test/" +
-                         "browser_dbg_debuggerstatement.html";
+const DEBUGGER_TAB_URL = EXAMPLE_URL + "browser_dbg_debuggerstatement.html";
 
 function test() {
   debug_tab_pane(DEBUGGER_TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.debuggerWindow;
 
--- a/browser/devtools/debugger/test/browser_dbg_debuggerstatement.js
+++ b/browser/devtools/debugger/test/browser_dbg_debuggerstatement.js
@@ -3,19 +3,17 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 // Tests the behavior of the debugger statement.
 
 var gClient = null;
 var gTab = null;
-const DEBUGGER_TAB_URL = "http://example.com/browser/browser/devtools/" +
-                         "debugger/test/" +
-                         "browser_dbg_debuggerstatement.html";
+const DEBUGGER_TAB_URL = EXAMPLE_URL + "browser_dbg_debuggerstatement.html";
 
 function test()
 {
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect(function(aType, aTraits) {
     gTab = addTab(DEBUGGER_TAB_URL, function() {
       attach_tab_actor_for_url(gClient, DEBUGGER_TAB_URL, function(actor, response) {
--- a/browser/devtools/debugger/test/browser_dbg_propertyview-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_propertyview-01.js
@@ -78,12 +78,65 @@ function testSimpleCall() {
     }}, 0);
   });
 
   gDebuggee.simpleCall();
 }
 
 function resumeAndFinish() {
   gDebugger.StackFrames.activeThread.resume(function() {
-    removeTab(gTab);
-    finish();
+    let vs = gDebugger.DebuggerView.Scripts;
+    let ss = gDebugger.SourceScripts;
+
+    is(ss._trimUrlQuery("a/b/c.d?test=1&random=4"), "a/b/c.d",
+      "Trimming the url query isn't done properly.");
+
+    let urls = [
+      { href: "ici://some.address.com/random/", leaf: "subrandom/" },
+      { href: "ni://another.address.org/random/subrandom/", leaf: "page.html" },
+      { href: "san://interesting.address.gro/random/", leaf: "script.js" },
+      { href: "si://interesting.address.moc/random/", leaf: "script.js" },
+      { href: "si://interesting.address.moc/random/", leaf: "x/script.js" },
+      { href: "si://interesting.address.moc/random/", leaf: "x/y/script.js?a=1" },
+      { href: "si://interesting.address.moc/random/x/", leaf: "y/script.js?a=1&b=2" },
+      { href: "si://interesting.address.moc/random/x/y/", leaf: "script.js?a=1&b=2&c=3" }
+    ];
+
+    vs._scripts.removeEventListener("select", vs._onScriptsChange, false);
+
+    urls.forEach(function(url) {
+      executeSoon(function() {
+        let loc = url.href + url.leaf;
+        vs.addScript(ss._getScriptLabel(loc, url.href), { url: loc });
+      });
+    });
+
+    executeSoon(function() {
+      for (let i = 0; i < vs._scripts.itemCount; i++) {
+        let lab = vs._scripts.getItemAtIndex(i).getAttribute("label");
+        let loc = urls[i].href + urls[i].leaf;
+
+        info("label: " + i + " " + lab);
+        ok(vs.contains(loc), "Script url is incorrect: " + loc);
+      }
+
+      ok(gDebugger.DebuggerView.Scripts.containsLabel("subrandom/"),
+        "Script (0) label is incorrect.");
+      ok(gDebugger.DebuggerView.Scripts.containsLabel("page.html"),
+        "Script (1) label is incorrect.");
+      ok(gDebugger.DebuggerView.Scripts.containsLabel("script.js"),
+        "Script (2) label is incorrect.");
+      ok(gDebugger.DebuggerView.Scripts.containsLabel("si://interesting.address.moc/random/script.js"),
+        "Script (3) label is incorrect.");
+      ok(gDebugger.DebuggerView.Scripts.containsLabel("x/script.js"),
+        "Script (4) label is incorrect.");
+      ok(gDebugger.DebuggerView.Scripts.containsLabel("x/y/script.js"),
+        "Script (5) label is incorrect.");
+
+      is(vs._scripts.itemCount, 6,
+        "Got too many script items in the list!");
+
+
+      removeTab(gTab);
+      finish();
+    });
   });
 }
--- a/browser/devtools/debugger/test/browser_dbg_propertyview-07.js
+++ b/browser/devtools/debugger/test/browser_dbg_propertyview-07.js
@@ -1,18 +1,17 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /**
  * Make sure that the property view displays function parameters.
  */
 
-const TAB_URL = "http://example.com/browser/browser/devtools/debugger/test/" +
-                "browser_dbg_frame-parameters.html";
+const TAB_URL = EXAMPLE_URL + "browser_dbg_frame-parameters.html";
 
 var gPane = null;
 var gTab = null;
 var gDebuggee = null;
 var gDebugger = null;
 
 function test()
 {
--- a/browser/devtools/debugger/test/browser_dbg_propertyview-08.js
+++ b/browser/devtools/debugger/test/browser_dbg_propertyview-08.js
@@ -1,18 +1,17 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /**
  * Make sure that the property view displays the properties of objects.
  */
 
-const TAB_URL = "http://example.com/browser/browser/devtools/debugger/test/" +
-                "browser_dbg_frame-parameters.html";
+const TAB_URL = EXAMPLE_URL + "browser_dbg_frame-parameters.html";
 
 var gPane = null;
 var gTab = null;
 var gDebuggee = null;
 var gDebugger = null;
 
 function test()
 {
--- a/browser/devtools/debugger/test/browser_dbg_script-switching.js
+++ b/browser/devtools/debugger/test/browser_dbg_script-switching.js
@@ -1,18 +1,18 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /**
  * Make sure that switching the displayed script in the UI works as advertised.
  */
 
-const TAB_URL = "http://example.com/browser/browser/devtools/debugger/" +
-                "test/browser_dbg_script-switching.html";
+const TAB_URL = EXAMPLE_URL + "browser_dbg_script-switching.html";
+
 let tempScope = {};
 Cu.import("resource:///modules/source-editor.jsm", tempScope);
 let SourceEditor = tempScope.SourceEditor;
 
 var gPane = null;
 var gTab = null;
 var gDebuggee = null;
 var gDebugger = null;
@@ -35,16 +35,34 @@ function testScriptsDisplay() {
     Services.tm.currentThread.dispatch({ run: function() {
       gScripts = gDebugger.DebuggerView.Scripts._scripts;
 
       is(gDebugger.StackFrames.activeThread.state, "paused",
         "Should only be getting stack frames while paused.");
 
       is(gScripts.itemCount, 2, "Found the expected number of scripts.");
 
+      for (let i = 0; i < gScripts.itemCount; i++) {
+        info("label: " + i + " " + gScripts.getItemAtIndex(i).getAttribute("label"));
+      }
+
+      let label1 = "test-script-switching-01.js";
+      let label2 = "test-script-switching-02.js";
+
+      ok(gDebugger.DebuggerView.Scripts.contains(EXAMPLE_URL +
+        label1), "First script url is incorrect.");
+      ok(gDebugger.DebuggerView.Scripts.contains(EXAMPLE_URL +
+        label2), "Second script url is incorrect.");
+
+      ok(gDebugger.DebuggerView.Scripts.containsLabel(
+        label1), "First script label is incorrect.");
+      ok(gDebugger.DebuggerView.Scripts.containsLabel(
+        label2), "Second script label is incorrect.");
+
+
       ok(gDebugger.editor.getText().search(/debugger/) != -1,
         "The correct script was loaded initially.");
 
       gDebugger.editor.addEventListener(SourceEditor.EVENTS.TEXT_CHANGED,
                                         function onChange() {
         gDebugger.editor.removeEventListener(SourceEditor.EVENTS.TEXT_CHANGED,
                                              onChange);
         testSwitchPaused();
--- a/browser/devtools/debugger/test/browser_dbg_select-line.js
+++ b/browser/devtools/debugger/test/browser_dbg_select-line.js
@@ -1,18 +1,18 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /**
  * Make sure that selecting a stack frame loads the right script in the editor
  * pane and highlights the proper line.
  */
 
-const TAB_URL = "http://example.com/browser/browser/devtools/debugger/" +
-                "test/browser_dbg_script-switching.html";
+const TAB_URL = EXAMPLE_URL + "browser_dbg_script-switching.html";
+
 let tempScope = {};
 Cu.import("resource:///modules/source-editor.jsm", tempScope);
 let SourceEditor = tempScope.SourceEditor;
 
 var gPane = null;
 var gTab = null;
 var gDebuggee = null;
 var gDebugger = null;
--- a/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js
+++ b/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js
@@ -1,18 +1,18 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /**
  * Make sure that updating the editor mode sets the right highlighting engine,
  * and script URIs with extra query parameters also get the right engine.
  */
 
-const TAB_URL = "http://example.com/browser/browser/devtools/debugger/" +
-                "test/browser_dbg_update-editor-mode.html";
+const TAB_URL = EXAMPLE_URL + "browser_dbg_update-editor-mode.html";
+
 let tempScope = {};
 Cu.import("resource:///modules/source-editor.jsm", tempScope);
 let SourceEditor = tempScope.SourceEditor;
 
 var gPane = null;
 var gTab = null;
 var gDebuggee = null;
 var gDebugger = null;
--- a/browser/devtools/debugger/test/head.js
+++ b/browser/devtools/debugger/test/head.js
@@ -9,21 +9,21 @@ let tempScope = {};
 Cu.import("resource:///modules/devtools/dbg-server.jsm", tempScope);
 Cu.import("resource:///modules/devtools/dbg-client.jsm", tempScope);
 Cu.import("resource:///modules/Services.jsm", tempScope);
 let DebuggerServer = tempScope.DebuggerServer;
 let DebuggerTransport = tempScope.DebuggerTransport;
 let DebuggerClient = tempScope.DebuggerClient;
 let Services = tempScope.Services;
 
-const TAB1_URL = "http://example.com/browser/browser/devtools/debugger/test/browser_dbg_tab1.html";
+const EXAMPLE_URL = "http://example.com/browser/browser/devtools/debugger/test/";
 
-const TAB2_URL = "http://example.com/browser/browser/devtools/debugger/test/browser_dbg_tab2.html";
-
-const STACK_URL = "http://example.com/browser/browser/devtools/debugger/test/browser_dbg_stack.html";
+const TAB1_URL = EXAMPLE_URL + "browser_dbg_tab1.html";
+const TAB2_URL = EXAMPLE_URL + "browser_dbg_tab2.html";
+const STACK_URL = EXAMPLE_URL + "browser_dbg_stack.html";
 
 if (!DebuggerServer.initialized) {
   DebuggerServer.init();
   DebuggerServer.addBrowserActors();
 }
 
 waitForExplicitFinish();
 
--- a/browser/devtools/highlighter/inspector.html
+++ b/browser/devtools/highlighter/inspector.html
@@ -1,14 +1,14 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-  <link rel="stylesheet" href="chrome://browser/skin/inspector.css" type="text/css"/>
+  <link rel="stylesheet" href="chrome://browser/skin/devtools/htmlpanel.css" type="text/css"/>
 </head>
 <body role="application">
   <div id="attribute-editor">
     <input id="attribute-editor-input" />
   </div>
 </body>
 </html>
--- a/browser/devtools/highlighter/inspector.jsm
+++ b/browser/devtools/highlighter/inspector.jsm
@@ -865,17 +865,18 @@ InspectorUI.prototype = {
    * Delete the selected node. Called via the Inspector:DeleteNode command.
    */
   deleteNode: function IUI_deleteNode()
   {
     let selection = this.selection;
     let parent = this.selection.parentNode;
 
     // remove the node from the treepanel
-    this.treePanel.deleteChildBox(selection);
+    if (this.treePanel.isOpen())
+      this.treePanel.deleteChildBox(selection);
 
     // remove the node from content
     parent.removeChild(selection);
     this.breadcrumbs.invalidateHierarchy();
 
     // select the parent node in the highlighter, treepanel, breadcrumbs
     this.inspectNode(parent);
   },
@@ -1229,16 +1230,17 @@ InspectorUI.prototype = {
     btn.setAttribute("type", "radio");
     btn.setAttribute("group", "sidebar-tools");
     this.sidebarToolbar.appendChild(btn);
 
     // create tool iframe
     let iframe = this.chromeDoc.createElement("iframe");
     iframe.id = "devtools-sidebar-iframe-" + aRegObj.id;
     iframe.setAttribute("flex", "1");
+    iframe.setAttribute("tooltip", "aHTMLTooltip");
     this.sidebarDeck.appendChild(iframe);
 
     // wire up button to show the iframe
     this.bindToolEvent(btn, "click", function showIframe() {
       this.toolShow(aRegObj);
     }.bind(this));
   },
 
--- a/browser/devtools/styleinspector/CssLogic.jsm
+++ b/browser/devtools/styleinspector/CssLogic.jsm
@@ -72,20 +72,28 @@
  * - why their expectations may not have been fulfilled
  * - how browsers process CSS
  * @constructor
  */
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
+const RX_UNIVERSAL_SELECTOR = /\s*\*\s*/g;
+const RX_NOT = /:not\((.*?)\)/g;
+const RX_PSEUDO_CLASS_OR_ELT = /(:[\w-]+\().*?\)/g;
+const RX_CONNECTORS = /\s*[\s>+~]\s*/g;
+const RX_ID = /\s*#\w+\s*/g;
+const RX_CLASS_OR_ATTRIBUTE = /\s*(?:\.\w+|\[.+?\])\s*/g;
+const RX_PSEUDO = /\s*:?:([\w-]+)(\(?\)?)\s*/g;
+
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
-var EXPORTED_SYMBOLS = ["CssLogic"];
+var EXPORTED_SYMBOLS = ["CssLogic", "CssSelector"];
 
 function CssLogic()
 {
   // The cache of examined CSS properties.
   _propertyInfos: {};
 }
 
 /**
@@ -1427,61 +1435,107 @@ CssSelector.prototype = {
    * stylesheet.
    */
   get ruleLine()
   {
     return this._cssRule.line;
   },
 
   /**
+   * Retrieve the pseudo-elements that we support. This list should match the
+   * elements specified in layout/style/nsCSSPseudoElementList.h
+   */
+  get pseudoElements()
+  {
+    if (!CssSelector._pseudoElements) {
+      let pseudos = CssSelector._pseudoElements = new Set();
+      pseudos.add("after");
+      pseudos.add("before");
+      pseudos.add("first-letter");
+      pseudos.add("first-line");
+      pseudos.add("selection");
+      pseudos.add("-moz-focus-inner");
+      pseudos.add("-moz-focus-outer");
+      pseudos.add("-moz-list-bullet");
+      pseudos.add("-moz-list-number");
+      pseudos.add("-moz-math-anonymous");
+      pseudos.add("-moz-math-stretchy");
+      pseudos.add("-moz-progress-bar");
+      pseudos.add("-moz-selection");
+    }
+    return CssSelector._pseudoElements;
+  },
+
+  /**
    * Retrieve specificity information for the current selector.
    *
    * @see http://www.w3.org/TR/css3-selectors/#specificity
    * @see http://www.w3.org/TR/CSS2/selector.html
    *
    * @return {object} an object holding specificity information for the current
    * selector.
    */
   get specificity()
   {
     if (this._specificity) {
       return this._specificity;
     }
 
-    let specificity = {};
+    let specificity = {
+      ids: 0,
+      classes: 0,
+      tags: 0
+    };
 
-    specificity.ids = 0;
-    specificity.classes = 0;
-    specificity.tags = 0;
+    let text = this.text;
 
-    // Split on CSS combinators (section 5.2).
-    // TODO: We need to properly parse the selector. See bug 592743.
     if (!this.elementStyle) {
-      this.text.split(/[ >+]/).forEach(function(aSimple) {
-        // The regex leaves empty nodes combinators like ' > '
-        if (!aSimple) {
-          return;
-        }
-        // See http://www.w3.org/TR/css3-selectors/#specificity
-        // We can count the IDs by counting the '#' marks.
-        specificity.ids += (aSimple.match(/#/g) || []).length;
-        // Similar with class names and attribute matchers
-        specificity.classes += (aSimple.match(/\./g) || []).length;
-        specificity.classes += (aSimple.match(/\[/g) || []).length;
-        // Pseudo elements count as elements.
-        specificity.tags += (aSimple.match(/:/g) || []).length;
-        // If we have anything of substance before we get into ids/classes/etc
-        // then it must be a tag if it isn't '*'.
-        let tag = aSimple.split(/[#.[:]/)[0];
-        if (tag && tag != "*") {
+      // Remove universal selectors as they are not relevant as far as specificity
+      // is concerned.
+      text = text.replace(RX_UNIVERSAL_SELECTOR, "");
+
+      // not() is ignored but any selectors contained by it are counted. Let's
+      // remove the not() and keep the contents.
+      text = text.replace(RX_NOT, " $1");
+
+      // Simplify remaining psuedo classes & elements.
+      text = text.replace(RX_PSEUDO_CLASS_OR_ELT, " $1)");
+
+      // Replace connectors with spaces
+      text = text.replace(RX_CONNECTORS, " ");
+
+      text.split(/\s/).forEach(function(aSimple) {
+        // Count IDs.
+        aSimple = aSimple.replace(RX_ID, function() {
+          specificity.ids++;
+          return "";
+        });
+
+        // Count class names and attribute matchers.
+        aSimple = aSimple.replace(RX_CLASS_OR_ATTRIBUTE, function() {
+          specificity.classes++;
+          return "";
+        });
+
+        aSimple = aSimple.replace(RX_PSEUDO, function(aDummy, aPseudoName) {
+          if (this.pseudoElements.has(aPseudoName)) {
+            // Pseudo elements count as tags.
+            specificity.tags++;
+          } else {
+            // Pseudo classes count as classes.
+            specificity.classes++;
+          }
+          return "";
+        }.bind(this));
+
+        if (aSimple) {
           specificity.tags++;
         }
       }, this);
     }
-
     this._specificity = specificity;
 
     return this._specificity;
   },
 
   toString: function CssSelector_toString()
   {
     return this.text;
--- a/browser/devtools/styleinspector/CssRuleView.jsm
+++ b/browser/devtools/styleinspector/CssRuleView.jsm
@@ -98,16 +98,23 @@ var EXPORTED_SYMBOLS = ["CssRuleView",
  *        set of disabled properties.
  *
  * @constructor
  */
 function ElementStyle(aElement, aStore)
 {
   this.element = aElement;
   this.store = aStore || {};
+
+  // We don't want to overwrite this.store.userProperties so we only create it
+  // if it doesn't already exist.
+  if (!("userProperties" in this.store)) {
+    this.store.userProperties = new UserProperties();
+  }
+
   if (this.store.disabled) {
     this.store.disabled = aStore.disabled;
   } else {
     this.store.disabled = WeakMap();
   }
 
   let doc = aElement.ownerDocument;
 
@@ -417,31 +424,33 @@ Rule.prototype = {
   /**
    * Reapply all the properties in this rule, and update their
    * computed styles.  Store disabled properties in the element
    * style's store.  Will re-mark overridden properties.
    */
   applyProperties: function Rule_applyProperties()
   {
     let disabledProps = [];
+    let store = this.elementStyle.store;
 
     for each (let prop in this.textProps) {
       if (!prop.enabled) {
         disabledProps.push({
           name: prop.name,
           value: prop.value,
           priority: prop.priority
         });
         continue;
       }
 
+      store.userProperties.setProperty(this.style, prop.name, prop.value);
+
       this.style.setProperty(prop.name, prop.value, prop.priority);
-      // Refresh the property's value from the style, to reflect
+      // Refresh the property's priority from the style, to reflect
       // any changes made during parsing.
-      prop.value = this.style.getPropertyValue(prop.name);
       prop.priority = this.style.getPropertyPriority(prop.name);
       prop.updateComputed();
     }
     this.elementStyle._changed();
 
     // Store disabled properties in the disabled store.
     let disabled = this.elementStyle.store.disabled;
     disabled.set(this.style, disabledProps);
@@ -514,41 +523,42 @@ Rule.prototype = {
 
   /**
    * Get the list of TextProperties from the style.  Needs
    * to parse the style's cssText.
    */
   _getTextProperties: function Rule_getTextProperties()
   {
     this.textProps = [];
+    let store = this.elementStyle.store;
     let lines = this.style.cssText.match(CSS_LINE_RE);
     for each (let line in lines) {
       let matches = CSS_PROP_RE.exec(line);
       if(!matches || !matches[2])
         continue;
 
       let name = matches[1];
       if (this.inherited &&
           !this.elementStyle.domUtils.isInheritedProperty(name)) {
         continue;
       }
-
-      let prop = new TextProperty(this, name, matches[2], matches[3] || "");
+      let value = store.userProperties.getProperty(this.style, name, matches[2]);
+      let prop = new TextProperty(this, name, value, matches[3] || "");
       this.textProps.push(prop);
     }
 
     // Include properties from the disabled property store, if any.
     let disabledProps = this.elementStyle.store.disabled.get(this.style);
     if (!disabledProps) {
       return;
     }
 
     for each (let prop in disabledProps) {
-      let textProp = new TextProperty(this, prop.name,
-                                      prop.value, prop.priority);
+      let value = store.userProperties.getProperty(this.style, prop.name, prop.value);
+      let textProp = new TextProperty(this, prop.name, value, prop.priority);
       textProp.enabled = false;
       this.textProps.push(textProp);
     }
   },
 };
 
 /**
  * A single property in a rule's cssText.
@@ -988,16 +998,22 @@ TextPropertyEditor.prototype = {
     // Save the initial value as the last committed value,
     // for restoring after pressing escape.
     this.committed = { name: this.prop.name,
                        value: this.prop.value,
                        priority: this.prop.priority };
 
     appendText(this.element, ";");
 
+    this.warning = createChild(this.element, "div", {
+      hidden: "",
+      class: "ruleview-warning",
+      title: CssLogic.l10n("rule.warning.title"),
+    });
+
     // Holds the viewers for the computed properties.
     // will be populated in |_updateComputed|.
     this.computed = createChild(this.element, "ul", {
       class: "ruleview-computedlist",
     });
   },
 
   /**
@@ -1023,16 +1039,17 @@ TextPropertyEditor.prototype = {
 
     // Combine the property's value and priority into one string for
     // the value.
     let val = this.prop.value;
     if (this.prop.priority) {
       val += " !" + this.prop.priority;
     }
     this.valueSpan.textContent = val;
+    this.warning.hidden = this._validate();
 
     // Populate the computed styles.
     this._updateComputed();
   },
 
   _onStartEditing: function TextPropertyEditor_onStartEditing()
   {
     this.element.classList.remove("ruleview-overridden");
@@ -1158,16 +1175,33 @@ TextPropertyEditor.prototype = {
       let val = this._parseValue(aValue);
       this.prop.setValue(val.value, val.priority);
       this.committed.value = this.prop.value;
       this.committed.priority = this.prop.priority;
     } else {
       this.prop.setValue(this.committed.value, this.committed.priority);
     }
   },
+
+  /**
+   * Validate this property.
+   *
+   * @returns {Boolean}
+   *          True if the property value is valid, false otherwise.
+   */
+  _validate: function TextPropertyEditor_validate()
+  {
+    let name = this.prop.name;
+    let value = this.prop.value;
+    let style = this.doc.createElementNS(HTML_NS, "div").style;
+
+    style.setProperty(name, value, null);
+
+    return !!style.getPropertyValue(name);
+  },
 };
 
 /**
  * Mark a span editable.  |editableField| will listen for the span to
  * be focused and create an InlineEditor to handle text input.
  * Changes will be committed when the InlineEditor's input is blurred
  * or dropped when the user presses escape.
  *
@@ -1377,16 +1411,71 @@ InplaceEditor.prototype = {
     // Call the user's change handler if available.
     if (this.change) {
       this.change(this.input.value.trim());
     }
   }
 };
 
 /**
+ * Store of CSSStyleDeclarations mapped to properties that have been changed by
+ * the user.
+ */
+function UserProperties()
+{
+  this.weakMap = new WeakMap();
+}
+
+UserProperties.prototype = {
+  /**
+   * Get a named property for a given CSSStyleDeclaration.
+   *
+   * @param {CSSStyleDeclaration} aStyle
+   *        The CSSStyleDeclaration against which the property is mapped.
+   * @param {String} aName
+   *        The name of the property to get.
+   * @param {Boolean} aDefault
+   *        Indicates whether the property value is one entered by a user.
+   * @returns {String}
+   *          The property value if it has previously been set by the user, null
+   *          otherwise.
+   */
+  getProperty: function UP_getProperty(aStyle, aName, aDefault) {
+    let entry = this.weakMap.get(aStyle, null);
+
+    if (entry && aName in entry) {
+      return entry[aName];
+    }
+    return typeof aDefault != "undefined" ? aDefault : null;
+
+  },
+
+  /**
+   * Set a named property for a given CSSStyleDeclaration.
+   *
+   * @param {CSSStyleDeclaration} aStyle
+   *        The CSSStyleDeclaration against which the property is to be mapped.
+   * @param {String} aName
+   *        The name of the property to set.
+   * @param {String} aValue
+   *        The value of the property to set.
+   */
+  setProperty: function UP_setProperty(aStyle, aName, aValue) {
+    let entry = this.weakMap.get(aStyle, null);
+    if (entry) {
+      entry[aName] = aValue;
+    } else {
+      let props = {};
+      props[aName] = aValue;
+      this.weakMap.set(aStyle, props);
+    }
+  },
+};
+
+/**
  * Helper functions
  */
 
 /**
  * Create a child element with a set of attributes.
  *
  * @param {Element} aParent
  *        The parent node.
--- a/browser/devtools/styleinspector/StyleInspector.jsm
+++ b/browser/devtools/styleinspector/StyleInspector.jsm
@@ -77,17 +77,17 @@ 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.label2"),
-        tooltiptext: this.l10n("style.highlighter.button.tooltip"),
+        tooltiptext: this.l10n("style.highlighter.button.tooltip2"),
         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,
--- a/browser/devtools/styleinspector/test/Makefile.in
+++ b/browser/devtools/styleinspector/test/Makefile.in
@@ -50,21 +50,23 @@ include $(topsrcdir)/config/rules.mk
   browser_bug683672.js \
   browser_styleinspector_bug_672746_default_styles.js \
   browser_styleinspector_bug_672744_search_filter.js \
   browser_bug589375_keybindings.js \
   browser_styleinspector_bug_689759_no_results_placeholder.js \
   browser_bug_692400_element_style.js \
   browser_csslogic_inherited.js \
   browser_ruleview_editor.js \
+  browser_ruleview_editor_changedvalues.js \
   browser_ruleview_inherit.js \
   browser_ruleview_manipulation.js \
   browser_ruleview_override.js \
   browser_ruleview_ui.js \
   browser_bug705707_is_content_stylesheet.js \
+  browser_bug_592743_specificity.js \
   head.js \
   $(NULL)
 
 _BROWSER_TEST_PAGES = \
   browser_bug683672.html \
   browser_bug705707_is_content_stylesheet.html \
   browser_bug705707_is_content_stylesheet_imported.css \
   browser_bug705707_is_content_stylesheet_imported2.css \
new file mode 100644
--- /dev/null
+++ b/browser/devtools/styleinspector/test/browser_bug_592743_specificity.js
@@ -0,0 +1,49 @@
+/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+// Tests that CSS specificity is properly calculated.
+
+let tempScope = {};
+Cu.import("resource:///modules/devtools/CssLogic.jsm", tempScope);
+let CssLogic = tempScope.CssLogic;
+let CssSelector = tempScope.CssSelector;
+
+function test()
+{
+  let tests = [
+    {text: "*", expected: "000"},
+    {text: "LI", expected: "001"},
+    {text: "UL LI", expected: "002"},
+    {text: "UL OL+LI", expected: "003"},
+    {text: "H1 + *[REL=up]", expected: "011"},
+    {text: "UL OL LI.red", expected: "013"},
+    {text: "LI.red.level", expected: "021"},
+    {text: ".red .level", expected: "020"},
+    {text: "#x34y", expected: "100"},
+    {text: "#s12:not(FOO)", expected: "101"},
+    {text: "body#home div#warning p.message", expected: "213"},
+    {text: "* body#home div#warning p.message", expected: "213"},
+    {text: "#footer *:not(nav) li", expected: "102"},
+    {text: "bar:nth-child(1n+0)", expected: "011"},
+    {text: "li::-moz-list-number", expected: "002"},
+    {text: "a:hover", expected: "011"},
+  ];
+
+  tests.forEach(function(aTest) {
+    let selector = new CssSelector(null, aTest.text);
+    let specificity = selector.specificity;
+
+    let result = "" + specificity.ids + specificity.classes + specificity.tags;
+    is(result, aTest.expected, "selector \"" + aTest.text +
+      "\" produces expected result");
+  });
+
+  finishUp();
+}
+
+function finishUp()
+{
+  CssLogic = CssSelector = null;
+  finish();
+}
new file mode 100644
--- /dev/null
+++ b/browser/devtools/styleinspector/test/browser_ruleview_editor_changedvalues.js
@@ -0,0 +1,190 @@
+/* vim: set ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+let tempScope = {};
+Cu.import("resource:///modules/devtools/CssRuleView.jsm", tempScope);
+let CssRuleView = tempScope.CssRuleView;
+let _ElementStyle = tempScope._ElementStyle;
+let _editableField = tempScope._editableField;
+
+let doc;
+let ruleDialog;
+let ruleView;
+
+function waitForEditorFocus(aParent, aCallback)
+{
+  aParent.addEventListener("focus", function onFocus(evt) {
+    if (evt.target.inplaceEditor) {
+      aParent.removeEventListener("focus", onFocus, true);
+      let editor = evt.target.inplaceEditor;
+      executeSoon(function() {
+        aCallback(editor);
+      });
+    }
+  }, true);
+}
+
+function waitForEditorBlur(aEditor, aCallback)
+{
+  let input = aEditor.input;
+  input.addEventListener("blur", function onBlur() {
+    input.removeEventListener("blur", onBlur, false);
+    executeSoon(function() {
+      aCallback();
+    });
+  }, false);
+}
+
+var gRuleViewChanged = false;
+function ruleViewChanged()
+{
+  gRuleViewChanged = true;
+}
+
+function expectChange()
+{
+  ok(gRuleViewChanged, "Rule view should have fired a change event.");
+  gRuleViewChanged = false;
+}
+
+function startTest()
+{
+  let style = '' +
+    '#testid {' +
+    '  background-color: blue;' +
+    '} ' +
+    '.testclass {' +
+    '  background-color: green;' +
+    '}';
+
+  let styleNode = addStyle(doc, style);
+  doc.body.innerHTML = '<div id="testid" class="testclass">Styled Node</div>';
+  let testElement = doc.getElementById("testid");
+
+  ruleDialog = openDialog("chrome://browser/content/devtools/cssruleview.xul",
+                          "cssruleviewtest",
+                          "width=200,height=350");
+  ruleDialog.addEventListener("load", function onLoad(evt) {
+    ruleDialog.removeEventListener("load", onLoad, true);
+    let doc = ruleDialog.document;
+    ruleView = new CssRuleView(doc);
+    doc.documentElement.appendChild(ruleView.element);
+    ruleView.element.addEventListener("CssRuleViewChanged", ruleViewChanged, false);
+    ruleView.highlight(testElement);
+    waitForFocus(testCancelNew, ruleDialog);
+  }, true);
+}
+
+function testCancelNew()
+{
+  // Start at the beginning: start to add a rule to the element's style
+  // declaration, but leave it empty.
+
+  let elementRuleEditor = ruleView.element.children[0]._ruleEditor;
+  waitForEditorFocus(elementRuleEditor.element, function onNewElement(aEditor) {
+    is(elementRuleEditor.newPropSpan.inplaceEditor, aEditor, "Next focused editor should be the new property editor.");
+    let input = aEditor.input;
+    waitForEditorBlur(aEditor, function () {
+      ok(!gRuleViewChanged, "Shouldn't get a change event after a cancel.");
+      is(elementRuleEditor.rule.textProps.length,  0, "Should have canceled creating a new text property.");
+      ok(!elementRuleEditor.propertyList.hasChildNodes(), "Should not have any properties.");
+      testCreateNew();
+    });
+    aEditor.input.blur();
+  });
+
+  EventUtils.synthesizeMouse(elementRuleEditor.closeBrace, 1, 1,
+                             { },
+                             ruleDialog);
+}
+
+function testCreateNew()
+{
+  // Create a new property.
+  let elementRuleEditor = ruleView.element.children[0]._ruleEditor;
+  waitForEditorFocus(elementRuleEditor.element, function onNewElement(aEditor) {
+    is(elementRuleEditor.newPropSpan.inplaceEditor, aEditor, "Next focused editor should be the new property editor.");
+    let input = aEditor.input;
+    input.value = "background-color";
+
+    waitForEditorFocus(elementRuleEditor.element, function onNewValue(aEditor) {
+      expectChange();
+      is(elementRuleEditor.rule.textProps.length,  1, "Should have created a new text property.");
+      is(elementRuleEditor.propertyList.children.length, 1, "Should have created a property editor.");
+      let textProp = elementRuleEditor.rule.textProps[0];
+      is(aEditor, textProp.editor.valueSpan.inplaceEditor, "Should be editing the value span now.");
+
+      aEditor.input.value = "#XYZ";
+      waitForEditorBlur(aEditor, function() {
+        expectChange();
+        is(textProp.value, "#XYZ", "Text prop should have been changed.");
+        is(textProp.editor._validate(), false, "#XYZ should not be a valid entry");
+        testEditProperty();
+      });
+      aEditor.input.blur();
+    });
+    EventUtils.synthesizeKey("VK_RETURN", {}, ruleDialog);
+  });
+
+  EventUtils.synthesizeMouse(elementRuleEditor.closeBrace, 1, 1,
+                             { },
+                             ruleDialog);
+}
+
+function testEditProperty()
+{
+  let idRuleEditor = ruleView.element.children[1]._ruleEditor;
+  let propEditor = idRuleEditor.rule.textProps[0].editor;
+  waitForEditorFocus(propEditor.element, function onNewElement(aEditor) {
+    is(propEditor.nameSpan.inplaceEditor, aEditor, "Next focused editor should be the name editor.");
+    let input = aEditor.input;
+    waitForEditorFocus(propEditor.element, function onNewName(aEditor) {
+      expectChange();
+      input = aEditor.input;
+      is(propEditor.valueSpan.inplaceEditor, aEditor, "Focus should have moved to the value.");
+
+      waitForEditorBlur(aEditor, function() {
+        expectChange();
+        let value = idRuleEditor.rule.style.getPropertyValue("border-color");
+        is(value, "red", "border-color should have been set.");
+        is(propEditor._validate(), true, "red should be a valid entry");
+        finishTest();
+      });
+
+      for each (let ch in "red;") {
+        EventUtils.sendChar(ch, ruleDialog);
+      }
+    });
+    for each (let ch in "border-color:") {
+      EventUtils.sendChar(ch, ruleDialog);
+    }
+  });
+
+  EventUtils.synthesizeMouse(propEditor.nameSpan, 1, 1,
+                             { },
+                             ruleDialog);}
+
+function finishTest()
+{
+  ruleView.element.removeEventListener("CssRuleViewChanged", ruleViewChanged, false);
+  ruleView.clear();
+  ruleDialog.close();
+  ruleDialog = ruleView = null;
+  doc = null;
+  gBrowser.removeCurrentTab();
+  finish();
+}
+
+function test()
+{
+  waitForExplicitFinish();
+  gBrowser.selectedTab = gBrowser.addTab();
+  gBrowser.selectedBrowser.addEventListener("load", function changedValues_load(evt) {
+    gBrowser.selectedBrowser.removeEventListener(evt.type, changedValues_load, true);
+    doc = content.document;
+    waitForFocus(startTest, content);
+  }, true);
+
+  content.location = "data:text/html,test rule view user changes";
+}
--- a/browser/locales/en-US/chrome/browser/devtools/gclicommands.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/gclicommands.properties
@@ -89,27 +89,27 @@ tiltTranslateManual=Incrementally transl
 # LOCALIZATION NOTE (tiltTranslateXDesc) A very short string to describe the
 # 'x' parameter to the 'tilt translate' command, which is displayed in a dialog
 # when the user is using this command.
 tiltTranslateXDesc=X (pixels)
 
 # LOCALIZATION NOTE (tiltTranslateXManual) A fuller description of the 'x'
 # parameter to the 'translate' command, displayed when the user asks for help
 # on what it does.
-tiltTranslateXManual=The ammount in pixels to translate the webpage mesh on the X axis
+tiltTranslateXManual=The amount in pixels to translate the webpage mesh on the X axis
 
 # LOCALIZATION NOTE (tiltTranslateYDesc) A very short string to describe the
 # 'y' parameter to the 'tilt translate' command, which is displayed in a dialog
 # when the user is using this command.
 tiltTranslateYDesc=Y (pixels)
 
 # LOCALIZATION NOTE (tiltTranslateYManual) A fuller description of the 'y'
 # parameter to the 'translate' command, displayed when the user asks for help
 # on what it does.
-tiltTranslateYManual=The ammount in pixels to translate the webpage mesh on the Y axis
+tiltTranslateYManual=The amount in pixels to translate the webpage mesh on the Y axis
 
 # LOCALIZATION NOTE (tiltRotateDesc) A very short description of the 'tilt rotate'
 # command. See tiltRotateManual for a fuller description of what it does. This
 # string is designed to be shown in a menu alongside the command name, which
 # is why it should be as short as possible.
 tiltRotateDesc=Spin the webpage mesh
 
 # LOCALIZATION NOTE (tiltRotateManual) A fuller description of the 'tilt rotate'
@@ -119,37 +119,37 @@ tiltRotateManual=Incrementally rotate th
 # LOCALIZATION NOTE (tiltRotateXDesc) A very short string to describe the
 # 'x' parameter to the 'tilt rotate' command, which is displayed in a dialog
 # when the user is using this command.
 tiltRotateXDesc=X (degrees)
 
 # LOCALIZATION NOTE (tiltRotateXManual) A fuller description of the 'x'
 # parameter to the 'rotate' command, displayed when the user asks for help
 # on what it does.
-tiltRotateXManual=The ammount in degrees to rotate the webpage mesh along the X axis
+tiltRotateXManual=The amount in degrees to rotate the webpage mesh along the X axis
 
 # LOCALIZATION NOTE (tiltRotateYDesc) A very short string to describe the
 # 'y' parameter to the 'tilt rotate' command, which is displayed in a dialog
 # when the user is using this command.
 tiltRotateYDesc=Y (degrees)
 
 # LOCALIZATION NOTE (tiltRotateYManual) A fuller description of the 'y'
 # parameter to the 'rotate' command, displayed when the user asks for help
 # on what it does.
-tiltRotateYManual=The ammount in degrees to rotate the webpage mesh along the Y axis
+tiltRotateYManual=The amount in degrees to rotate the webpage mesh along the Y axis
 
 # LOCALIZATION NOTE (tiltRotateZDesc) A very short string to describe the
 # 'z' parameter to the 'tilt rotate' command, which is displayed in a dialog
 # when the user is using this command.
 tiltRotateZDesc=Z (degrees)
 
 # LOCALIZATION NOTE (tiltRotateZManual) A fuller description of the 'z'
 # parameter to the 'rotate' command, displayed when the user asks for help
 # on what it does.
-tiltRotateZManual=The ammount in degrees to rotate the webpage mesh along the Z axis
+tiltRotateZManual=The amount in degrees to rotate the webpage mesh along the Z axis
 
 # LOCALIZATION NOTE (tiltZoomDesc) A very short description of the 'tilt zoom'
 # command. See tiltZoomManual for a fuller description of what it does. This
 # string is designed to be shown in a menu alongside the command name, which
 # is why it should be as short as possible.
 tiltZoomDesc=Move away or towards the webpage mesh
 
 # LOCALIZATION NOTE (tiltZoomManual) A fuller description of the 'tilt zoom'
--- a/browser/locales/en-US/chrome/browser/devtools/styleinspector.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/styleinspector.properties
@@ -32,15 +32,20 @@ rule.sourceElement=element
 # 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.
 # "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
+style.highlighter.button.tooltip2=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
+
+# LOCALIZATION NOTE (rule.warning.title): When an invalid property value is
+# entered into the rule view a warning icon is displayed. This text is used for
+# the title attribute of the warning icon.
+rule.warning.title=Invalid property value
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5c5d0aec58bd073334798117dc955d67edeb0276
GIT binary patch
literal 613
zc$@)c0-F7aP)<h;3K|Lk000e1NJLTq000dD000aK1^@s6xwkjj0000PbVXQnQ*UN;
zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU!2T4RhRCwA{k;`inQ543{ea+m=BlAdN
z0wqyI+9H)!S5<c+T?j%Kii=`hsO_R?p^6JvrQ$|V6!9+*AGi>uf`VFf<6|RA(KdCV
z#wePkt!bJx$;{kw5~3s*4%`dh?>pyy2i=+60`1550T_i-x{9YO4w@M{_wt%*b#-W{
z-wp(Y5cJ1wd?}Trd`+lV)(cB%u1B8`D*xBv&Ncw53^R(MK}Fg6i7S$ueS3AfR$fus
zWf(QwTNONp!#eEOdxr1z9(sIQnES4awZ&aOKhB=$fc{;C0LjweY{Vi8;c7iFdA|Jp
z>kr8-v5jvJ##etWB|D(z=LwvQN7-J(Mi7$S-ub6D@bCFY1Eyty0-5dk#fM{^5I`zo
z;N#I4167wnRK6rCf3kz76;5(az&0q<va?4EnfLuoNCZTP!LfLZ?NkDQFb-}po$yv(
zT`+8|4+SGoiGjhFH|H1bjybg|X#~-2n|Q*CFd#C5nhQ`P$<MLABkx#zAYJ$T=J?@o
zV3wO3E#($=V}+xs#3m`ub=KGsR2{aVZyULp+;R9~v8<dguDV6xiXd4GF~ij|uP>j$
zVU3I$CIcoBKtW%bdZ9{oZqJ+B6WxUm_YYFv*Pyi$F4Mp@Jw(eMy_K)ZBjqB-tsrqJ
z_w0aJuMfsjUABXnmoE_qV}u-mJf!!$_$$BwV7{+%n+Ij`00000NkvXXu0mjf*SZsB
--- a/browser/themes/gnomestripe/devtools/csshtmltree.css
+++ b/browser/themes/gnomestripe/devtools/csshtmltree.css
@@ -212,16 +212,29 @@
 .ruleview-rule-source:hover {
   text-decoration: underline;
 }
 
 .ruleview-code {
   padding: 2px 5px;
 }
 
+.ruleview-warning {
+  background: url("chrome://browser/skin/devtools/alerticon-warning.png");
+  display: inline-block;
+  -moz-margin-start: 5px;
+  vertical-align: middle;
+  width: 13px;
+  height: 12px;
+}
+
+.ruleview-warning[hidden] {
+  display: none;
+}
+
 .ruleview-ruleopen {
   -moz-padding-end: 5px;
 }
 
 .ruleview-propertylist {
   list-style: none;
   padding: 0;
   margin: 0;
--- a/browser/themes/gnomestripe/devtools/debugger.css
+++ b/browser/themes/gnomestripe/devtools/debugger.css
@@ -111,18 +111,23 @@ a {
 /**
  * Stack frames
  */
 
 #stackframes {
   background-color: white;
 }
 
-.dbg-stackframe-id {
-  -moz-padding-end: 1em;
+.dbg-stackframe {
+  -moz-padding-start: 4px;
+  -moz-padding-end: 4px;
+}
+
+.dbg-stackframe-name {
+  font-weight: 600;
 }
 
 /**
  * Properties elements
  */
 
 #variables {
   background-color: white;
new file mode 100644
--- /dev/null
+++ b/browser/themes/gnomestripe/devtools/htmlpanel.css
@@ -0,0 +1,402 @@
+/*
+ * Software License Agreement (BSD License)
+ *
+ * Copyright (c) 2007, Parakey Inc.
+ * All rights reserved.
+ * 
+ * Redistribution and use of this software in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ * 
+ * * Redistributions of source code must retain the above
+ *   copyright notice, this list of conditions and the
+ *   following disclaimer.
+ * 
+ * * Redistributions in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the
+ *   following disclaimer in the documentation and/or other
+ *   materials provided with the distribution.
+ * 
+ * * Neither the name of Parakey Inc. nor the names of its
+ *   contributors may be used to endorse or promote products
+ *   derived from this software without specific prior
+ *   written permission of Parakey Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Creator:
+ *  Joe Hewitt
+ * Contributors
+ *  John J. Barton (IBM Almaden)
+ *  Jan Odvarko (Mozilla Corp.)
+ *  Max Stepanov (Aptana Inc.)
+ *  Rob Campbell (Mozilla Corp.)
+ *  Hans Hillen (Paciello Group, Mozilla)
+ *  Curtis Bartley (Mozilla Corp.)
+ *  Mike Collins (IBM Almaden)
+ *  Kevin Decker
+ *  Mike Ratcliffe (Comartis AG)
+ *  Hernan Rodríguez Colmeiro
+ *  Austin Andrews
+ *  Christoph Dorn
+ *  Steven Roussey (AppCenter Inc, Network54)
+ */
+
+html {
+  background-color: -moz-dialog;
+}
+
+body {
+  margin: 0;
+  overflow: auto;
+  font-family: Lucida Grande, sans-serif;
+  font-size: 11px;
+  padding-top: 5px;
+}
+
+h1 {
+  font-size: 17px;
+  border-bottom: 1px solid threedlightshadow;
+}
+
+a {
+  color: #0000ff;
+}
+
+pre {
+  margin: 0;
+  font: inherit;
+}
+
+code {
+  display: block;
+  white-space: pre;
+}
+
+/* DOMPlate */
+
+.objectLink-element,
+.objectLink-textNode,
+.objectLink-function,
+.objectBox-stackTrace,
+.objectLink-profile {
+  font-family: Menlo, Andale Mono, monospace;
+}
+
+.objectLink-textNode {
+  white-space: pre-wrap;
+}
+
+.objectLink-styleRule,
+.objectLink-element,
+.objectLink-textNode {
+  color: #000088;
+}
+
+.selectorTag,
+.selectorId,
+.selectorClass {
+  font-family: Menlo, Andale Mono, monospace;
+  font-weight: normal;
+}
+
+.selectorTag {
+  color: #0000FF;
+}
+
+.selectorId {
+  color: DarkBlue;
+}
+
+.selectorClass {
+  color: red;
+}
+
+.selectorHidden > .selectorTag {
+  color: #5F82D9;
+}
+
+.selectorHidden > .selectorId {
+  color: #888888;
+}
+
+.selectorHidden > .selectorClass {
+  color: #D86060;
+}
+
+.selectorValue {
+  font-family: Menlo, Andale Mono, monospace;
+  font-style: italic;
+  color: #555555;
+}
+
+.panelNode-html {
+  -moz-box-sizing: padding-box;
+  padding: 4px 0 0 2px;
+}
+
+.nodeBox {
+  position: relative;
+  font-family: Menlo, Andale Mono, monospace;
+  padding-left: 13px;
+  -moz-user-select: -moz-none;
+}
+
+.nodeBox.search-selection {
+  -moz-user-select: text;
+}
+
+.twisty {
+  position: absolute;
+  left: 0px;
+  padding: 8px;
+}
+
+.nodeChildBox {
+  margin-left: 12px;
+  display: none;
+}
+
+.nodeLabel,
+.nodeCloseLabel {
+  margin: -2px 2px 0 2px;
+  border: 2px solid transparent;
+  border-radius: 3px;
+  padding: 0 2px;
+  color: #000088;
+}
+
+.nodeCloseLabel {
+  display: none;
+}
+
+.nodeTag {
+  cursor: pointer;
+  color: blue;
+}
+
+.nodeValue {
+  color: #FF0000;
+  font-weight: normal;
+}
+
+.nodeText,
+.nodeComment {
+  margin: 0 2px;
+  vertical-align: top;
+}
+
+.nodeText {
+  color: #333333;
+}
+
+.docType {
+  position: absolute;
+  /* position DOCTYPE element above/outside the "nodeBox" that contains it */
+  /* Note: to be fixed in Bug #688439 */
+  top: -16px;
+  font-family: Menlo, Andale Mono, monospace;
+  padding-left: 8px;
+  color: #999;
+  white-space: nowrap;
+  font-style: italic;
+}
+
+.htmlNodeBox {
+  /* make room for DOCTYPE element to be rendered above/outside "nodeBox" */
+  /* Note: to be fixed in Bug #688439 */
+  margin-top: 16px;
+}
+
+.nodeWhiteSpace {
+  border: 1px solid LightGray;
+  white-space: pre; /* otherwise the border will be collapsed around zero pixels */
+  margin-left: 1px;
+  color: gray;
+}
+
+.nodeWhiteSpace_Space {
+  border: 1px solid #ddd;
+}
+
+.nodeTextEntity {
+  border: 1px solid gray;
+  white-space: pre; /* otherwise the border will be collapsed around zero pixels */
+  margin-left: 1px;
+}
+
+.nodeComment {
+  color: DarkGreen;
+}
+
+.nodeBox.highlightOpen > .nodeLabel {
+  background-color: #EEEEEE;
+}
+
+.nodeBox.highlightOpen > .nodeCloseLabel,
+.nodeBox.highlightOpen > .nodeChildBox,
+.nodeBox.open > .nodeCloseLabel,
+.nodeBox.open > .nodeChildBox {
+  display: block;
+}
+
+.nodeBox.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel {
+  border-color: Highlight;
+  background-color: Highlight;
+  color: HighlightText !important;
+}
+
+.nodeBox.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText {
+  color: inherit !important;
+}
+
+.nodeBox.highlighted > .nodeLabel {
+  border-color: Highlight !important;
+  background-color: cyan !important;
+  color: #000000 !important;
+}
+
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox,
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeText {
+  color: #000000 !important;
+}
+
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox,
+.nodeBox.nodeHidden .nodeCloseLabel,
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeText,
+.nodeBox.nodeHidden .nodeText {
+  color: #888888;
+}
+
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.nodeHidden .nodeCloseLabel > .nodeCloseLabelBox > .nodeTag {
+  color: #5F82D9;
+}
+
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue {
+  color: #D86060;
+}
+
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeText {
+  color: SkyBlue !important;
+}
+
+.nodeBox.mutated > .nodeLabel,
+.nodeAttr.mutated,
+.nodeValue.mutated,
+.nodeText.mutated,
+.nodeBox.mutated > .nodeText {
+  background-color: #EFFF79;
+  color: #FF0000 !important;
+}
+
+.nodeBox.selected.mutated > .nodeLabel,
+.nodeBox.selected.mutated > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr.mutated > .nodeValue,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue.mutated,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText.mutated {
+  background-color: #EFFF79;
+  border-color: #EFFF79;
+  color: #FF0000 !important;
+}
+
+.logRow-dirxml {
+  padding-left: 0;
+}
+
+.soloElement > .nodeBox  {
+  padding-left: 0;
+}
+
+.useA11y .nodeLabel.focused {
+  outline: 2px solid #FF9933;
+  -moz-outline-radius: 3px;
+  outline-offset: -2px;
+}
+
+.useA11y .nodeLabelBox:focus {
+  outline: none;
+}
+
+/* from panel.css */
+
+/* HTML panel */
+
+.nodeBox.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel {
+  border-color: #3875d7;
+  background-color: #3875d7;
+  color: #FFFFFF !important;
+}
+
+.nodeBox.highlighted > .nodeLabel {
+  border-color: #3875d7 !important;
+}
+
+/************************************************************************************************/
+/* Twisties */
+
+.twisty
+{
+  -moz-appearance: treetwisty;
+}
+
+.nodeBox.highlightOpen > .nodeLabel > .twisty,
+.nodeBox.open > .nodeLabel > .twisty
+{
+  -moz-appearance: treetwistyopen;
+}
+
+/************************************************************************************************/
+/* HTML panel */
+
+.nodeBox.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel {
+  border-color: #3875d7;
+  background-color: #3875d7;
+  color: #FFFFFF !important;
+}
+
+.nodeBox.highlighted > .nodeLabel {
+  border-color: #3875d7 !important;
+}
+
+.editingAttributeValue {
+  background-color: #492;
+}
+
+#attribute-editor {
+  visibility: hidden;
+  position: absolute;
+  z-index: 5000;
+  background-color: #fff;
+  border: 1px solid #000;
+}
+
+#attribute-editor.editing {
+  visibility: visible;
+}
+
+#attribute-editor-input {
+  border: none;
+  padding: 2px 5px;
+  font-family: Menlo, Andale Mono, monospace;
+  font-size: 11px;
+}
deleted file mode 100644
--- a/browser/themes/gnomestripe/inspector.css
+++ /dev/null
@@ -1,402 +0,0 @@
-/*
- * Software License Agreement (BSD License)
- *
- * Copyright (c) 2007, Parakey Inc.
- * All rights reserved.
- * 
- * Redistribution and use of this software in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- * 
- * * Redistributions of source code must retain the above
- *   copyright notice, this list of conditions and the
- *   following disclaimer.
- * 
- * * Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the
- *   following disclaimer in the documentation and/or other
- *   materials provided with the distribution.
- * 
- * * Neither the name of Parakey Inc. nor the names of its
- *   contributors may be used to endorse or promote products
- *   derived from this software without specific prior
- *   written permission of Parakey Inc.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
- * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Creator:
- *  Joe Hewitt
- * Contributors
- *  John J. Barton (IBM Almaden)
- *  Jan Odvarko (Mozilla Corp.)
- *  Max Stepanov (Aptana Inc.)
- *  Rob Campbell (Mozilla Corp.)
- *  Hans Hillen (Paciello Group, Mozilla)
- *  Curtis Bartley (Mozilla Corp.)
- *  Mike Collins (IBM Almaden)
- *  Kevin Decker
- *  Mike Ratcliffe (Comartis AG)
- *  Hernan Rodríguez Colmeiro
- *  Austin Andrews
- *  Christoph Dorn
- *  Steven Roussey (AppCenter Inc, Network54)
- */
-
-html {
-  background-color: -moz-dialog;
-}
-
-body {
-  margin: 0;
-  overflow: auto;
-  font-family: Lucida Grande, sans-serif;
-  font-size: 11px;
-  padding-top: 5px;
-}
-
-h1 {
-  font-size: 17px;
-  border-bottom: 1px solid threedlightshadow;
-}
-
-a {
-  color: #0000ff;
-}
-
-pre {
-  margin: 0;
-  font: inherit;
-}
-
-code {
-  display: block;
-  white-space: pre;
-}
-
-/* DOMPlate */
-
-.objectLink-element,
-.objectLink-textNode,
-.objectLink-function,
-.objectBox-stackTrace,
-.objectLink-profile {
-  font-family: Menlo, Andale Mono, monospace;
-}
-
-.objectLink-textNode {
-  white-space: pre-wrap;
-}
-
-.objectLink-styleRule,
-.objectLink-element,
-.objectLink-textNode {
-  color: #000088;
-}
-
-.selectorTag,
-.selectorId,
-.selectorClass {
-  font-family: Menlo, Andale Mono, monospace;
-  font-weight: normal;
-}
-
-.selectorTag {
-  color: #0000FF;
-}
-
-.selectorId {
-  color: DarkBlue;
-}
-
-.selectorClass {
-  color: red;
-}
-
-.selectorHidden > .selectorTag {
-  color: #5F82D9;
-}
-
-.selectorHidden > .selectorId {
-  color: #888888;
-}
-
-.selectorHidden > .selectorClass {
-  color: #D86060;
-}
-
-.selectorValue {
-  font-family: Menlo, Andale Mono, monospace;
-  font-style: italic;
-  color: #555555;
-}
-
-.panelNode-html {
-  -moz-box-sizing: padding-box;
-  padding: 4px 0 0 2px;
-}
-
-.nodeBox {
-  position: relative;
-  font-family: Menlo, Andale Mono, monospace;
-  padding-left: 13px;
-  -moz-user-select: -moz-none;
-}
-
-.nodeBox.search-selection {
-  -moz-user-select: text;
-}
-
-.twisty {
-  position: absolute;
-  left: 0px;
-  padding: 8px;
-}
-
-.nodeChildBox {
-  margin-left: 12px;
-  display: none;
-}
-
-.nodeLabel,
-.nodeCloseLabel {
-  margin: -2px 2px 0 2px;
-  border: 2px solid transparent;
-  border-radius: 3px;
-  padding: 0 2px;
-  color: #000088;
-}
-
-.nodeCloseLabel {
-  display: none;
-}
-
-.nodeTag {
-  cursor: pointer;
-  color: blue;
-}
-
-.nodeValue {
-  color: #FF0000;
-  font-weight: normal;
-}
-
-.nodeText,
-.nodeComment {
-  margin: 0 2px;
-  vertical-align: top;
-}
-
-.nodeText {
-  color: #333333;
-}
-
-.docType {
-  position: absolute;
-  /* position DOCTYPE element above/outside the "nodeBox" that contains it */
-  /* Note: to be fixed in Bug #688439 */
-  top: -16px;
-  font-family: Menlo, Andale Mono, monospace;
-  padding-left: 8px;
-  color: #999;
-  white-space: nowrap;
-  font-style: italic;
-}
-
-.htmlNodeBox {
-  /* make room for DOCTYPE element to be rendered above/outside "nodeBox" */
-  /* Note: to be fixed in Bug #688439 */
-  margin-top: 16px;
-}
-
-.nodeWhiteSpace {
-  border: 1px solid LightGray;
-  white-space: pre; /* otherwise the border will be collapsed around zero pixels */
-  margin-left: 1px;
-  color: gray;
-}
-
-.nodeWhiteSpace_Space {
-  border: 1px solid #ddd;
-}
-
-.nodeTextEntity {
-  border: 1px solid gray;
-  white-space: pre; /* otherwise the border will be collapsed around zero pixels */
-  margin-left: 1px;
-}
-
-.nodeComment {
-  color: DarkGreen;
-}
-
-.nodeBox.highlightOpen > .nodeLabel {
-  background-color: #EEEEEE;
-}
-
-.nodeBox.highlightOpen > .nodeCloseLabel,
-.nodeBox.highlightOpen > .nodeChildBox,
-.nodeBox.open > .nodeCloseLabel,
-.nodeBox.open > .nodeChildBox {
-  display: block;
-}
-
-.nodeBox.selected > .nodeLabel > .nodeLabelBox,
-.nodeBox.selected > .nodeLabel {
-  border-color: Highlight;
-  background-color: Highlight;
-  color: HighlightText !important;
-}
-
-.nodeBox.selected > .nodeLabel > .nodeLabelBox,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText {
-  color: inherit !important;
-}
-
-.nodeBox.highlighted > .nodeLabel {
-  border-color: Highlight !important;
-  background-color: cyan !important;
-  color: #000000 !important;
-}
-
-.nodeBox.highlighted > .nodeLabel > .nodeLabelBox,
-.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeTag,
-.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
-.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeText {
-  color: #000000 !important;
-}
-
-.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox,
-.nodeBox.nodeHidden .nodeCloseLabel,
-.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeText,
-.nodeBox.nodeHidden .nodeText {
-  color: #888888;
-}
-
-.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeTag,
-.nodeBox.nodeHidden .nodeCloseLabel > .nodeCloseLabelBox > .nodeTag {
-  color: #5F82D9;
-}
-
-.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue {
-  color: #D86060;
-}
-
-.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox,
-.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
-.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
-.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeText {
-  color: SkyBlue !important;
-}
-
-.nodeBox.mutated > .nodeLabel,
-.nodeAttr.mutated,
-.nodeValue.mutated,
-.nodeText.mutated,
-.nodeBox.mutated > .nodeText {
-  background-color: #EFFF79;
-  color: #FF0000 !important;
-}
-
-.nodeBox.selected.mutated > .nodeLabel,
-.nodeBox.selected.mutated > .nodeLabel > .nodeLabelBox,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr.mutated > .nodeValue,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue.mutated,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText.mutated {
-  background-color: #EFFF79;
-  border-color: #EFFF79;
-  color: #FF0000 !important;
-}
-
-.logRow-dirxml {
-  padding-left: 0;
-}
-
-.soloElement > .nodeBox  {
-  padding-left: 0;
-}
-
-.useA11y .nodeLabel.focused {
-  outline: 2px solid #FF9933;
-  -moz-outline-radius: 3px;
-  outline-offset: -2px;
-}
-
-.useA11y .nodeLabelBox:focus {
-  outline: none;
-}
-
-/* from panel.css */
-
-/* HTML panel */
-
-.nodeBox.selected > .nodeLabel > .nodeLabelBox,
-.nodeBox.selected > .nodeLabel {
-  border-color: #3875d7;
-  background-color: #3875d7;
-  color: #FFFFFF !important;
-}
-
-.nodeBox.highlighted > .nodeLabel {
-  border-color: #3875d7 !important;
-}
-
-/************************************************************************************************/
-/* Twisties */
-
-.twisty
-{
-  -moz-appearance: treetwisty;
-}
-
-.nodeBox.highlightOpen > .nodeLabel > .twisty,
-.nodeBox.open > .nodeLabel > .twisty
-{
-  -moz-appearance: treetwistyopen;
-}
-
-/************************************************************************************************/
-/* HTML panel */
-
-.nodeBox.selected > .nodeLabel > .nodeLabelBox,
-.nodeBox.selected > .nodeLabel {
-  border-color: #3875d7;
-  background-color: #3875d7;
-  color: #FFFFFF !important;
-}
-
-.nodeBox.highlighted > .nodeLabel {
-  border-color: #3875d7 !important;
-}
-
-.editingAttributeValue {
-  background-color: #492;
-}
-
-#attribute-editor {
-  visibility: hidden;
-  position: absolute;
-  z-index: 5000;
-  background-color: #fff;
-  border: 1px solid #000;
-}
-
-#attribute-editor.editing {
-  visibility: visible;
-}
-
-#attribute-editor-input {
-  border: none;
-  padding: 2px 5px;
-  font-family: Menlo, Andale Mono, monospace;
-  font-size: 11px;
-}
--- a/browser/themes/gnomestripe/jar.mn
+++ b/browser/themes/gnomestripe/jar.mn
@@ -8,17 +8,16 @@ browser.jar:
   skin/classic/browser/aboutCertError.css             (aboutCertError.css)
 #ifdef MOZ_SERVICES_SYNC
   skin/classic/browser/aboutSyncTabs.css
 #endif
   skin/classic/browser/actionicon-tab.png
 * skin/classic/browser/browser.css                    (browser.css)
 * skin/classic/browser/engineManager.css              (engineManager.css)
   skin/classic/browser/fullscreen-video.css
-  skin/classic/browser/inspector.css
   skin/classic/browser/Geolocation-16.png
   skin/classic/browser/Geolocation-64.png
   skin/classic/browser/Go-arrow.png
   skin/classic/browser/identity.png
   skin/classic/browser/Info.png
   skin/classic/browser/KUI-close.png
   skin/classic/browser/monitor.png
   skin/classic/browser/monitor_16-10.png
@@ -83,22 +82,24 @@ browser.jar:
   skin/classic/browser/tabview/edit-light.png         (tabview/edit-light.png)
   skin/classic/browser/tabview/search.png             (tabview/search.png)
   skin/classic/browser/tabview/stack-expander.png     (tabview/stack-expander.png)
   skin/classic/browser/tabview/tabview.png            (tabview/tabview.png)
   skin/classic/browser/tabview/tabview.css            (tabview/tabview.css)
   skin/classic/browser/devtools/common.css            (devtools/common.css)
   skin/classic/browser/devtools/arrows.png            (devtools/arrows.png)
   skin/classic/browser/devtools/commandline.png       (devtools/commandline.png)
+  skin/classic/browser/devtools/alerticon-warning.png (devtools/alerticon-warning.png)
   skin/classic/browser/devtools/goto-mdn.png          (devtools/goto-mdn.png)
   skin/classic/browser/devtools/csshtmltree.css       (devtools/csshtmltree.css)
   skin/classic/browser/devtools/webconsole.css                  (devtools/webconsole.css)
   skin/classic/browser/devtools/webconsole_networkpanel.css     (devtools/webconsole_networkpanel.css)
   skin/classic/browser/devtools/webconsole.png                  (devtools/webconsole.png)
   skin/classic/browser/devtools/gcli.css              (devtools/gcli.css)
+  skin/classic/browser/devtools/htmlpanel.css         (devtools/htmlpanel.css)
   skin/classic/browser/devtools/orion.css             (devtools/orion.css)
   skin/classic/browser/devtools/orion-container.css   (devtools/orion-container.css)
   skin/classic/browser/devtools/orion-task.png        (devtools/orion-task.png)
   skin/classic/browser/devtools/orion-breakpoint.png  (devtools/orion-breakpoint.png)
   skin/classic/browser/devtools/breadcrumbs/ltr-end-pressed.png              (devtools/breadcrumbs/ltr-end-pressed.png)
   skin/classic/browser/devtools/breadcrumbs/ltr-end-selected-pressed.png     (devtools/breadcrumbs/ltr-end-selected-pressed.png)
   skin/classic/browser/devtools/breadcrumbs/ltr-end-selected.png             (devtools/breadcrumbs/ltr-end-selected.png)
   skin/classic/browser/devtools/breadcrumbs/ltr-end.png                      (devtools/breadcrumbs/ltr-end.png)
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5c5d0aec58bd073334798117dc955d67edeb0276
GIT binary patch
literal 613
zc$@)c0-F7aP)<h;3K|Lk000e1NJLTq000dD000aK1^@s6xwkjj0000PbVXQnQ*UN;
zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU!2T4RhRCwA{k;`inQ543{ea+m=BlAdN
z0wqyI+9H)!S5<c+T?j%Kii=`hsO_R?p^6JvrQ$|V6!9+*AGi>uf`VFf<6|RA(KdCV
z#wePkt!bJx$;{kw5~3s*4%`dh?>pyy2i=+60`1550T_i-x{9YO4w@M{_wt%*b#-W{
z-wp(Y5cJ1wd?}Trd`+lV)(cB%u1B8`D*xBv&Ncw53^R(MK}Fg6i7S$ueS3AfR$fus
zWf(QwTNONp!#eEOdxr1z9(sIQnES4awZ&aOKhB=$fc{;C0LjweY{Vi8;c7iFdA|Jp
z>kr8-v5jvJ##etWB|D(z=LwvQN7-J(Mi7$S-ub6D@bCFY1Eyty0-5dk#fM{^5I`zo
z;N#I4167wnRK6rCf3kz76;5(az&0q<va?4EnfLuoNCZTP!LfLZ?NkDQFb-}po$yv(
zT`+8|4+SGoiGjhFH|H1bjybg|X#~-2n|Q*CFd#C5nhQ`P$<MLABkx#zAYJ$T=J?@o
zV3wO3E#($=V}+xs#3m`ub=KGsR2{aVZyULp+;R9~v8<dguDV6xiXd4GF~ij|uP>j$
zVU3I$CIcoBKtW%bdZ9{oZqJ+B6WxUm_YYFv*Pyi$F4Mp@Jw(eMy_K)ZBjqB-tsrqJ
z_w0aJuMfsjUABXnmoE_qV}u-mJf!!$_$$BwV7{+%n+Ij`00000NkvXXu0mjf*SZsB
--- a/browser/themes/pinstripe/devtools/csshtmltree.css
+++ b/browser/themes/pinstripe/devtools/csshtmltree.css
@@ -214,16 +214,29 @@
 .ruleview-rule-source:hover {
   text-decoration: underline;
 }
 
 .ruleview-code {
   padding: 2px 5px;
 }
 
+.ruleview-warning {
+  background: url("chrome://browser/skin/devtools/alerticon-warning.png");
+  display: inline-block;
+  -moz-margin-start: 5px;
+  vertical-align: middle;
+  width: 13px;
+  height: 12px;
+}
+
+.ruleview-warning[hidden] {
+  display: none;
+}
+
 .ruleview-ruleopen {
   -moz-padding-end: 5px;
 }
 
 .ruleview-propertylist {
   list-style: none;
   padding: 0;
   margin: 0;
--- a/browser/themes/pinstripe/devtools/debugger.css
+++ b/browser/themes/pinstripe/devtools/debugger.css
@@ -115,18 +115,23 @@ a {
 /**
  * Stack frames
  */
 
 #stackframes {
   background-color: white;
 }
 
-.dbg-stackframe-id {
-  -moz-padding-end: 1em;
+.dbg-stackframe {
+  -moz-padding-start: 4px;
+  -moz-padding-end: 4px;
+}
+
+.dbg-stackframe-name {
+  font-weight: 600;
 }
 
 /**
  * Properties elements
  */
 
 #variables {
   background-color: white;
new file mode 100644
--- /dev/null
+++ b/browser/themes/pinstripe/devtools/htmlpanel.css
@@ -0,0 +1,392 @@
+/*
+ * Software License Agreement (BSD License)
+ *
+ * Copyright (c) 2007, Parakey Inc.
+ * All rights reserved.
+ * 
+ * Redistribution and use of this software in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ * 
+ * * Redistributions of source code must retain the above
+ *   copyright notice, this list of conditions and the
+ *   following disclaimer.
+ * 
+ * * Redistributions in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the
+ *   following disclaimer in the documentation and/or other
+ *   materials provided with the distribution.
+ * 
+ * * Neither the name of Parakey Inc. nor the names of its
+ *   contributors may be used to endorse or promote products
+ *   derived from this software without specific prior
+ *   written permission of Parakey Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Creator:
+ *  Joe Hewitt
+ * Contributors
+ *  John J. Barton (IBM Almaden)
+ *  Jan Odvarko (Mozilla Corp.)
+ *  Max Stepanov (Aptana Inc.)
+ *  Rob Campbell (Mozilla Corp.)
+ *  Hans Hillen (Paciello Group, Mozilla)
+ *  Curtis Bartley (Mozilla Corp.)
+ *  Mike Collins (IBM Almaden)
+ *  Kevin Decker
+ *  Mike Ratcliffe (Comartis AG)
+ *  Hernan Rodríguez Colmeiro
+ *  Austin Andrews
+ *  Christoph Dorn
+ *  Steven Roussey (AppCenter Inc, Network54)
+ */
+
+html {
+  background-color: -moz-dialog;
+}
+
+body {
+  margin: 0;
+  overflow: auto;
+  font-family: Lucida Grande, sans-serif;
+  font-size: 11px;
+  padding-top: 5px;
+}
+
+h1 {
+  font-size: 17px;
+  border-bottom: 1px solid threedlightshadow;
+}
+
+a {
+  color: #0000ff;
+}
+
+pre {
+  margin: 0;
+  font: inherit;
+}
+
+code {
+  display: block;
+  white-space: pre;
+}
+
+/* DOMPlate */
+
+.objectLink-element,
+.objectLink-textNode,
+.objectLink-function,
+.objectBox-stackTrace,
+.objectLink-profile {
+  font-family: Menlo, Andale Mono, monospace;
+}
+
+.objectLink-textNode {
+  white-space: pre-wrap;
+}
+
+.objectLink-styleRule,
+.objectLink-element,
+.objectLink-textNode {
+  color: #000088;
+}
+
+.selectorTag,
+.selectorId,
+.selectorClass {
+  font-family: Menlo, Andale Mono, monospace;
+  font-weight: normal;
+}
+
+.selectorTag {
+  color: #0000FF;
+}
+
+.selectorId {
+  color: DarkBlue;
+}
+
+.selectorClass {
+  color: red;
+}
+
+.selectorHidden > .selectorTag {
+  color: #5F82D9;
+}
+
+.selectorHidden > .selectorId {
+  color: #888888;
+}
+
+.selectorHidden > .selectorClass {
+  color: #D86060;
+}
+
+.selectorValue {
+  font-family: Menlo, Andale Mono, monospace;
+  font-style: italic;
+  color: #555555;
+}
+
+.panelNode-html {
+  -moz-box-sizing: padding-box;
+  padding: 4px 0 0 2px;
+}
+
+.nodeBox {
+  position: relative;
+  font-family: Menlo, Andale Mono, monospace;
+  padding-left: 13px;
+  -moz-user-select: -moz-none;
+}
+
+.nodeBox.search-selection {
+  -moz-user-select: text;
+}
+
+.twisty {
+  position: absolute;
+  left: 0px;
+  top: 0px;
+  width: 14px;
+  height: 14px;
+}
+
+.nodeChildBox {
+  margin-left: 12px;
+  display: none;
+}
+
+.nodeLabel,
+.nodeCloseLabel {
+  margin: -2px 2px 0 2px;
+  border: 2px solid transparent;
+  border-radius: 3px;
+  padding: 0 2px;
+  color: #000088;
+}
+
+.nodeCloseLabel {
+  display: none;
+}
+
+.nodeTag {
+  cursor: pointer;
+  color: blue;
+}
+
+.nodeValue {
+  color: #FF0000;
+  font-weight: normal;
+}
+
+.nodeText,
+.nodeComment {
+  margin: 0 2px;
+  vertical-align: top;
+}
+
+.nodeText {
+  color: #333333;
+}
+
+.docType {
+  position: absolute;
+  /* position DOCTYPE element above/outside the "nodeBox" that contains it */
+  /* Note: to be fixed in Bug #688439 */
+  top: -16px;
+  font-family: Menlo, Andale Mono, monospace;
+  padding-left: 8px;
+  color: #999;
+  white-space: nowrap;
+  font-style: italic;
+}
+
+.htmlNodeBox {
+  /* make room for DOCTYPE element to be rendered above/outside "nodeBox" */
+  /* Note: to be fixed in Bug #688439 */
+  margin-top: 16px;
+}
+
+.nodeWhiteSpace {
+  border: 1px solid LightGray;
+  white-space: pre; /* otherwise the border will be collapsed around zero pixels */
+  margin-left: 1px;
+  color: gray;
+}
+
+.nodeWhiteSpace_Space {
+  border: 1px solid #ddd;
+}
+
+.nodeTextEntity {
+  border: 1px solid gray;
+  white-space: pre; /* otherwise the border will be collapsed around zero pixels */
+  margin-left: 1px;
+}
+
+.nodeComment {
+  color: DarkGreen;
+}
+
+.nodeBox.highlightOpen > .nodeLabel {
+  background-color: #EEEEEE;
+}
+
+.nodeBox.highlightOpen > .nodeCloseLabel,
+.nodeBox.highlightOpen > .nodeChildBox,
+.nodeBox.open > .nodeCloseLabel,
+.nodeBox.open > .nodeChildBox {
+  display: block;
+}
+
+.nodeBox.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel {
+  border-color: Highlight;
+  background-color: Highlight;
+  color: HighlightText !important;
+}
+
+.nodeBox.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText {
+  color: inherit !important;
+}
+
+.nodeBox.highlighted > .nodeLabel {
+  border-color: Highlight !important;
+  background-color: cyan !important;
+  color: #000000 !important;
+}
+
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox,
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeText {
+  color: #000000 !important;
+}
+
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox,
+.nodeBox.nodeHidden .nodeCloseLabel,
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeText,
+.nodeBox.nodeHidden .nodeText {
+  color: #888888;
+}
+
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.nodeHidden .nodeCloseLabel > .nodeCloseLabelBox > .nodeTag {
+  color: #5F82D9;
+}
+
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue {
+  color: #D86060;
+}
+
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeText {
+  color: SkyBlue !important;
+}
+
+.nodeBox.mutated > .nodeLabel,
+.nodeAttr.mutated,
+.nodeValue.mutated,
+.nodeText.mutated,
+.nodeBox.mutated > .nodeText {
+  background-color: #EFFF79;
+  color: #FF0000 !important;
+}
+
+.nodeBox.selected.mutated > .nodeLabel,
+.nodeBox.selected.mutated > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr.mutated > .nodeValue,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue.mutated,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText.mutated {
+  background-color: #EFFF79;
+  border-color: #EFFF79;
+  color: #FF0000 !important;
+}
+
+.logRow-dirxml {
+  padding-left: 0;
+}
+
+.soloElement > .nodeBox  {
+  padding-left: 0;
+}
+
+.nodeBox.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel {
+  border-color: #3875d7;
+  background-color: #3875d7;
+  color: #FFFFFF !important;
+}
+
+.nodeBox.highlighted > .nodeLabel {
+  border-color: #3875d7 !important;
+}
+
+/************************************************************************************************/
+/* Twisties */
+
+.twisty
+{
+  -moz-appearance: treetwisty;
+}
+
+.nodeBox.highlightOpen > .nodeLabel > .twisty,
+.nodeBox.open > .nodeLabel > .twisty
+{
+  -moz-appearance: treetwistyopen;
+}
+
+.memberRow.hasChildren > .memberLabelCell > .memberLabel,
+.hasHeaders .netHrefLabel {
+  background-position: 2px 2px;
+}
+
+.nodeBox.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel {
+  border-color: #3875d7;
+  background-color: #3875d7;
+  color: #FFFFFF !important;
+}
+
+.nodeBox.highlighted > .nodeLabel {
+  border-color: #3875d7 !important;
+}
+
+.editingAttributeValue {
+  background-color: #492;
+}
+
+#attribute-editor {
+  visibility: hidden;
+  position: absolute;
+  z-index: 5000;
+  background-color: #fff;
+  border: 1px solid #000;
+}
+
+#attribute-editor.editing {
+  visibility: visible;
+}
+
+#attribute-editor-input {
+  border: none;
+  padding: 2px 5px;
+  font-family: Menlo, Andale Mono, monospace;
+  font-size: 11px;
+}
deleted file mode 100644
--- a/browser/themes/pinstripe/inspector.css
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * Software License Agreement (BSD License)
- *
- * Copyright (c) 2007, Parakey Inc.
- * All rights reserved.
- * 
- * Redistribution and use of this software in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- * 
- * * Redistributions of source code must retain the above
- *   copyright notice, this list of conditions and the
- *   following disclaimer.
- * 
- * * Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the
- *   following disclaimer in the documentation and/or other
- *   materials provided with the distribution.
- * 
- * * Neither the name of Parakey Inc. nor the names of its
- *   contributors may be used to endorse or promote products
- *   derived from this software without specific prior
- *   written permission of Parakey Inc.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
- * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Creator:
- *  Joe Hewitt
- * Contributors
- *  John J. Barton (IBM Almaden)
- *  Jan Odvarko (Mozilla Corp.)
- *  Max Stepanov (Aptana Inc.)
- *  Rob Campbell (Mozilla Corp.)
- *  Hans Hillen (Paciello Group, Mozilla)
- *  Curtis Bartley (Mozilla Corp.)
- *  Mike Collins (IBM Almaden)
- *  Kevin Decker
- *  Mike Ratcliffe (Comartis AG)
- *  Hernan Rodríguez Colmeiro
- *  Austin Andrews
- *  Christoph Dorn
- *  Steven Roussey (AppCenter Inc, Network54)
- */
-
-html {
-  background-color: -moz-dialog;
-}
-
-body {
-  margin: 0;
-  overflow: auto;
-  font-family: Lucida Grande, sans-serif;
-  font-size: 11px;
-  padding-top: 5px;
-}
-
-h1 {
-  font-size: 17px;
-  border-bottom: 1px solid threedlightshadow;
-}
-
-a {
-  color: #0000ff;
-}
-
-pre {
-  margin: 0;
-  font: inherit;
-}
-
-code {
-  display: block;
-  white-space: pre;
-}
-
-/* DOMPlate */
-
-.objectLink-element,
-.objectLink-textNode,
-.objectLink-function,
-.objectBox-stackTrace,
-.objectLink-profile {
-  font-family: Menlo, Andale Mono, monospace;
-}
-
-.objectLink-textNode {
-  white-space: pre-wrap;
-}
-
-.objectLink-styleRule,
-.objectLink-element,
-.objectLink-textNode {
-  color: #000088;
-}
-
-.selectorTag,
-.selectorId,
-.selectorClass {
-  font-family: Menlo, Andale Mono, monospace;
-  font-weight: normal;
-}
-
-.selectorTag {
-  color: #0000FF;
-}
-
-.selectorId {
-  color: DarkBlue;
-}
-
-.selectorClass {
-  color: red;
-}
-
-.selectorHidden > .selectorTag {
-  color: #5F82D9;
-}
-
-.selectorHidden > .selectorId {
-  color: #888888;
-}
-
-.selectorHidden > .selectorClass {
-  color: #D86060;
-}
-
-.selectorValue {
-  font-family: Menlo, Andale Mono, monospace;
-  font-style: italic;
-  color: #555555;
-}
-
-.panelNode-html {
-  -moz-box-sizing: padding-box;
-  padding: 4px 0 0 2px;
-}
-
-.nodeBox {
-  position: relative;
-  font-family: Menlo, Andale Mono, monospace;
-  padding-left: 13px;
-  -moz-user-select: -moz-none;
-}
-
-.nodeBox.search-selection {
-  -moz-user-select: text;
-}
-
-.twisty {
-  position: absolute;
-  left: 0px;
-  top: 0px;
-  width: 14px;
-  height: 14px;
-}
-
-.nodeChildBox {
-  margin-left: 12px;
-  display: none;
-}
-
-.nodeLabel,
-.nodeCloseLabel {
-  margin: -2px 2px 0 2px;
-  border: 2px solid transparent;
-  border-radius: 3px;
-  padding: 0 2px;
-  color: #000088;
-}
-
-.nodeCloseLabel {
-  display: none;
-}
-
-.nodeTag {
-  cursor: pointer;
-  color: blue;
-}
-
-.nodeValue {
-  color: #FF0000;
-  font-weight: normal;
-}
-
-.nodeText,
-.nodeComment {
-  margin: 0 2px;
-  vertical-align: top;
-}
-
-.nodeText {
-  color: #333333;
-}
-
-.docType {
-  position: absolute;
-  /* position DOCTYPE element above/outside the "nodeBox" that contains it */
-  /* Note: to be fixed in Bug #688439 */
-  top: -16px;
-  font-family: Menlo, Andale Mono, monospace;
-  padding-left: 8px;
-  color: #999;
-  white-space: nowrap;
-  font-style: italic;
-}
-
-.htmlNodeBox {
-  /* make room for DOCTYPE element to be rendered above/outside "nodeBox" */
-  /* Note: to be fixed in Bug #688439 */
-  margin-top: 16px;
-}
-
-.nodeWhiteSpace {
-  border: 1px solid LightGray;
-  white-space: pre; /* otherwise the border will be collapsed around zero pixels */
-  margin-left: 1px;
-  color: gray;
-}
-
-.nodeWhiteSpace_Space {
-  border: 1px solid #ddd;
-}
-
-.nodeTextEntity {
-  border: 1px solid gray;
-  white-space: pre; /* otherwise the border will be collapsed around zero pixels */
-  margin-left: 1px;
-}
-
-.nodeComment {
-  color: DarkGreen;
-}
-
-.nodeBox.highlightOpen > .nodeLabel {
-  background-color: #EEEEEE;
-}
-
-.nodeBox.highlightOpen > .nodeCloseLabel,
-.nodeBox.highlightOpen > .nodeChildBox,
-.nodeBox.open > .nodeCloseLabel,
-.nodeBox.open > .nodeChildBox {
-  display: block;
-}
-
-.nodeBox.selected > .nodeLabel > .nodeLabelBox,
-.nodeBox.selected > .nodeLabel {
-  border-color: Highlight;
-  background-color: Highlight;
-  color: HighlightText !important;
-}
-
-.nodeBox.selected > .nodeLabel > .nodeLabelBox,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText {
-  color: inherit !important;
-}
-
-.nodeBox.highlighted > .nodeLabel {
-  border-color: Highlight !important;
-  background-color: cyan !important;
-  color: #000000 !important;
-}
-
-.nodeBox.highlighted > .nodeLabel > .nodeLabelBox,
-.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeTag,
-.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
-.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeText {
-  color: #000000 !important;
-}
-
-.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox,
-.nodeBox.nodeHidden .nodeCloseLabel,
-.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeText,
-.nodeBox.nodeHidden .nodeText {
-  color: #888888;
-}
-
-.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeTag,
-.nodeBox.nodeHidden .nodeCloseLabel > .nodeCloseLabelBox > .nodeTag {
-  color: #5F82D9;
-}
-
-.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue {
-  color: #D86060;
-}
-
-.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox,
-.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
-.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
-.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeText {
-  color: SkyBlue !important;
-}
-
-.nodeBox.mutated > .nodeLabel,
-.nodeAttr.mutated,
-.nodeValue.mutated,
-.nodeText.mutated,
-.nodeBox.mutated > .nodeText {
-  background-color: #EFFF79;
-  color: #FF0000 !important;
-}
-
-.nodeBox.selected.mutated > .nodeLabel,
-.nodeBox.selected.mutated > .nodeLabel > .nodeLabelBox,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr.mutated > .nodeValue,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue.mutated,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText.mutated {
-  background-color: #EFFF79;
-  border-color: #EFFF79;
-  color: #FF0000 !important;
-}
-
-.logRow-dirxml {
-  padding-left: 0;
-}
-
-.soloElement > .nodeBox  {
-  padding-left: 0;
-}
-
-.nodeBox.selected > .nodeLabel > .nodeLabelBox,
-.nodeBox.selected > .nodeLabel {
-  border-color: #3875d7;
-  background-color: #3875d7;
-  color: #FFFFFF !important;
-}
-
-.nodeBox.highlighted > .nodeLabel {
-  border-color: #3875d7 !important;
-}
-
-/************************************************************************************************/
-/* Twisties */
-
-.twisty
-{
-  -moz-appearance: treetwisty;
-}
-
-.nodeBox.highlightOpen > .nodeLabel > .twisty,
-.nodeBox.open > .nodeLabel > .twisty
-{
-  -moz-appearance: treetwistyopen;
-}
-
-.memberRow.hasChildren > .memberLabelCell > .memberLabel,
-.hasHeaders .netHrefLabel {
-  background-position: 2px 2px;
-}
-
-.nodeBox.selected > .nodeLabel > .nodeLabelBox,
-.nodeBox.selected > .nodeLabel {
-  border-color: #3875d7;
-  background-color: #3875d7;
-  color: #FFFFFF !important;
-}
-
-.nodeBox.highlighted > .nodeLabel {
-  border-color: #3875d7 !important;
-}
-
-.editingAttributeValue {
-  background-color: #492;
-}
-
-#attribute-editor {
-  visibility: hidden;
-  position: absolute;
-  z-index: 5000;
-  background-color: #fff;
-  border: 1px solid #000;
-}
-
-#attribute-editor.editing {
-  visibility: visible;
-}
-
-#attribute-editor-input {
-  border: none;
-  padding: 2px 5px;
-  font-family: Menlo, Andale Mono, monospace;
-  font-size: 11px;
-}
--- a/browser/themes/pinstripe/jar.mn
+++ b/browser/themes/pinstripe/jar.mn
@@ -53,17 +53,16 @@ browser.jar:
   skin/classic/browser/feeds/videoFeedIcon.png              (feeds/feedIcon.png)
   skin/classic/browser/feeds/videoFeedIcon16.png            (feeds/feedIcon16.png)
   skin/classic/browser/feeds/audioFeedIcon.png              (feeds/feedIcon.png)
   skin/classic/browser/feeds/audioFeedIcon16.png            (feeds/feedIcon16.png)
   skin/classic/browser/newtab/newTab.css                    (newtab/newTab.css)
   skin/classic/browser/newtab/strip.png                     (newtab/strip.png)
   skin/classic/browser/newtab/toolbar.png                   (newtab/toolbar.png)
   skin/classic/browser/setDesktopBackground.css
-  skin/classic/browser/inspector.css
   skin/classic/browser/monitor.png
   skin/classic/browser/monitor_16-10.png
   skin/classic/browser/places/allBookmarks.png              (places/allBookmarks.png)
 * skin/classic/browser/places/places.css                    (places/places.css)
 * skin/classic/browser/places/organizer.css                 (places/organizer.css)
   skin/classic/browser/places/query.png                     (places/query.png)
   skin/classic/browser/places/bookmarksMenu.png             (places/bookmarksMenu.png)
   skin/classic/browser/places/bookmarksToolbar.png          (places/bookmarksToolbar.png)
@@ -122,19 +121,21 @@ browser.jar:
   skin/classic/browser/tabview/edit-light.png               (tabview/edit-light.png)
   skin/classic/browser/tabview/search.png                   (tabview/search.png)
   skin/classic/browser/tabview/stack-expander.png           (tabview/stack-expander.png)
   skin/classic/browser/tabview/tabview.png                  (tabview/tabview.png)
   skin/classic/browser/tabview/tabview.css                  (tabview/tabview.css)
 * skin/classic/browser/devtools/common.css                  (devtools/common.css)
   skin/classic/browser/devtools/arrows.png                  (devtools/arrows.png)
   skin/classic/browser/devtools/commandline.png             (devtools/commandline.png)
+  skin/classic/browser/devtools/alerticon-warning.png       (devtools/alerticon-warning.png)
   skin/classic/browser/devtools/goto-mdn.png                (devtools/goto-mdn.png)
   skin/classic/browser/devtools/csshtmltree.css             (devtools/csshtmltree.css)
   skin/classic/browser/devtools/gcli.css                    (devtools/gcli.css)
+  skin/classic/browser/devtools/htmlpanel.css               (devtools/htmlpanel.css)
   skin/classic/browser/devtools/orion.css                   (devtools/orion.css)
   skin/classic/browser/devtools/orion-container.css         (devtools/orion-container.css)
   skin/classic/browser/devtools/orion-task.png              (devtools/orion-task.png)
   skin/classic/browser/devtools/orion-breakpoint.png        (devtools/orion-breakpoint.png)
   skin/classic/browser/devtools/toolbarbutton-close.png     (devtools/toolbarbutton-close.png)
 * skin/classic/browser/devtools/webconsole.css                  (devtools/webconsole.css)
   skin/classic/browser/devtools/webconsole_networkpanel.css     (devtools/webconsole_networkpanel.css)
   skin/classic/browser/devtools/webconsole.png                  (devtools/webconsole.png)
@@ -160,20 +161,20 @@ browser.jar:
   skin/classic/browser/devtools/breadcrumbs/rtl-middle.png                   (devtools/breadcrumbs/rtl-middle.png)
   skin/classic/browser/devtools/breadcrumbs/rtl-start-pressed.png            (devtools/breadcrumbs/rtl-start-pressed.png)
   skin/classic/browser/devtools/breadcrumbs/rtl-start-selected-pressed.png   (devtools/breadcrumbs/rtl-start-selected-pressed.png)
   skin/classic/browser/devtools/breadcrumbs/rtl-start.png                    (devtools/breadcrumbs/rtl-start.png)
   skin/classic/browser/devtools/breadcrumbs/rtl-start-selected.png           (devtools/breadcrumbs/rtl-start-selected.png)
   skin/classic/browser/devtools/splitview.css               (devtools/splitview.css)
   skin/classic/browser/devtools/styleeditor.css             (devtools/styleeditor.css)
   skin/classic/browser/devtools/debugger.css                (devtools/debugger.css)
-  skin/classic/browser/devtools/magnifying-glass.png	    (devtools/magnifying-glass.png)
-  skin/classic/browser/devtools/itemToggle.png		    (devtools/itemToggle.png)
-  skin/classic/browser/devtools/itemArrow-rtl.png	    (devtools/itemArrow-rtl.png)
-  skin/classic/browser/devtools/itemArrow-ltr.png	    (devtools/itemArrow-ltr.png)
+  skin/classic/browser/devtools/magnifying-glass.png        (devtools/magnifying-glass.png)
+  skin/classic/browser/devtools/itemToggle.png              (devtools/itemToggle.png)
+  skin/classic/browser/devtools/itemArrow-rtl.png           (devtools/itemArrow-rtl.png)
+  skin/classic/browser/devtools/itemArrow-ltr.png           (devtools/itemArrow-ltr.png)
   skin/classic/browser/devtools/background-noise-toolbar.png (devtools/background-noise-toolbar.png)
 #ifdef MOZ_SERVICES_SYNC
   skin/classic/browser/sync-throbber.png
   skin/classic/browser/sync-16.png
   skin/classic/browser/sync-32.png
   skin/classic/browser/sync-bg.png
   skin/classic/browser/sync-128.png
   skin/classic/browser/sync-desktopIcon.png
index 5c5881d51490c78ca606db20ca0a4adc51e1e602..250ea7463d2e9e29b80ad796154e7f5fcada1992
GIT binary patch
literal 3823
zc%1E*<yR997sm$(%qh|}MH&GGso{@CM&sy>l$7q27%-%zk&+M)BsPiZ1`?xjl#~Ke
z3P{L6x<ekG-+%F(^L$=>&-cYW_r<;U+;eY&zODuh2n+%M05n>fs)hgn8RE(d04c7t
zk`LMq0FdwNKQUGV{Gb0#C@CpHp#S!lmX?;0k&%s!je~=Oo10reK!Bg0UszaJR8&+_
zQu5KGM{;s<N=iylC{#^NO+!ONM@L6bPtVB62o8rM5D0T~b1N$=TU%QP2L~4y7k78}
ztDN56-hO_5fq{WnJ~%iyEG!I#LPbSI#m2@aBqSs!C#R*QWn^SzWo6~&=H}<;zj^bf
z_+PH#OG`@&3JS{0%d4uY&}j7g_wQ?JYOq)=4u`|z@%8ofjg5`X&CLV?p}oDmqobp%
ztE;D{he#y$_4Nq}2@MVo4h;>B{>#|d*!cMP<mBY^^z`iP?A*W1&(AL|E-o!CEiW&x
ztgQV0{hLH0ZES38Zf<UGZ(r%|?(W{+-v0jn;o;%&@$u>D>Dk%Y#l;1_xnpx{=koG0
z$5!%c{sAZchPp-oGIEM*lvLEf>!2GqX>QTd(K9kJv#_#*Z{Oj#%gM#f!^_7na8FQ3
z`2GXYhhpLql2Q=qNB_vk$tx-;KURUNs;O&eYH8~{f$8e$8yFfH!x1K?X66=_PpzzN
zZ0+oyIXF5wySll1czSvJ`1<(=1U?T64hcnug-4(wUqr>k#>FSROiW5nNlnjqm6?^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uoNCZTP!LfLZ?NkDQFb-}po$yv(
zT`+8|4+SGoiGjhFH|H1bjybg|X#~-2n|Q*CFd#C5nhQ`P$<MLABkx#zAYJ$T=J?@o
zV3wO3E#($=V}+xs#3m`ub=KGsR2{aVZyULp+;R9~v8<dguDV6xiXd4GF~ij|uP>j$
zVU3I$CIcoBKtW%bdZ9{oZqJ+B6WxUm_YYFv*Pyi$F4Mp@Jw(eMy_K)ZBjqB-tsrqJ
z_w0aJuMfsjUABXnmoE_qV}u-mJf!!$_$$BwV7{+%n+Ij`00000NkvXXu0mjf*SZsB
--- a/browser/themes/winstripe/devtools/csshtmltree.css
+++ b/browser/themes/winstripe/devtools/csshtmltree.css
@@ -212,16 +212,29 @@
 .ruleview-rule-source:hover {
   text-decoration: underline;
 }
 
 .ruleview-code {
   padding: 2px 5px;
 }
 
+.ruleview-warning {
+  background: url("chrome://browser/skin/devtools/alerticon-warning.png");
+  display: inline-block;
+  -moz-margin-start: 5px;
+  vertical-align: middle;
+  width: 13px;
+  height: 12px;
+}
+
+.ruleview-warning[hidden] {
+  display: none;
+}
+
 .ruleview-ruleopen {
   -moz-padding-end: 5px;
 }
 
 .ruleview-propertylist {
   list-style: none;
   padding: 0;
   margin: 0;
--- a/browser/themes/winstripe/devtools/debugger.css
+++ b/browser/themes/winstripe/devtools/debugger.css
@@ -111,18 +111,23 @@ a {
 /**
  * Stack frames
  */
 
 #stackframes {
   background-color: white;
 }
 
-.dbg-stackframe-id {
-  -moz-padding-end: 1em;
+.dbg-stackframe {
+  -moz-padding-start: 4px;
+  -moz-padding-end: 4px;
+}
+
+.dbg-stackframe-name {
+  font-weight: 600;
 }
 
 /**
  * Properties elements
  */
 
 #variables {
   background-color: white;
new file mode 100644
--- /dev/null
+++ b/browser/themes/winstripe/devtools/htmlpanel.css
@@ -0,0 +1,377 @@
+/*
+ * Software License Agreement (BSD License)
+ *
+ * Copyright (c) 2007, Parakey Inc.
+ * All rights reserved.
+ * 
+ * Redistribution and use of this software in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ * 
+ * * Redistributions of source code must retain the above
+ *   copyright notice, this list of conditions and the
+ *   following disclaimer.
+ * 
+ * * Redistributions in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the
+ *   following disclaimer in the documentation and/or other
+ *   materials provided with the distribution.
+ * 
+ * * Neither the name of Parakey Inc. nor the names of its
+ *   contributors may be used to endorse or promote products
+ *   derived from this software without specific prior
+ *   written permission of Parakey Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Creator:
+ *  Joe Hewitt
+ * Contributors
+ *  John J. Barton (IBM Almaden)
+ *  Jan Odvarko (Mozilla Corp.)
+ *  Max Stepanov (Aptana Inc.)
+ *  Rob Campbell (Mozilla Corp.)
+ *  Hans Hillen (Paciello Group, Mozilla)
+ *  Curtis Bartley (Mozilla Corp.)
+ *  Mike Collins (IBM Almaden)
+ *  Kevin Decker
+ *  Mike Ratcliffe (Comartis AG)
+ *  Hernan Rodríguez Colmeiro
+ *  Austin Andrews
+ *  Christoph Dorn
+ *  Steven Roussey (AppCenter Inc, Network54)
+ */
+
+html {
+  background-color: -moz-dialog;
+}
+
+body {
+  margin: 0;
+  overflow: auto;
+  font-family: Lucida Grande, sans-serif;
+  font-size: 11px;
+  padding-top: 5px;
+}
+
+h1 {
+  font-size: 17px;
+  border-bottom: 1px solid threedlightshadow;
+}
+
+a {
+  color: #0000ff;
+}
+
+pre {
+  margin: 0;
+  font: inherit;
+}
+
+code {
+  display: block;
+  white-space: pre;
+}
+
+/* DOMPlate */
+
+.objectLink-element,
+.objectLink-textNode,
+.objectLink-function,
+.objectBox-stackTrace,
+.objectLink-profile {
+  font-family: Menlo, Andale Mono, monospace;
+}
+
+.objectLink-textNode {
+  white-space: pre-wrap;
+}
+
+.objectLink-styleRule,
+.objectLink-element,
+.objectLink-textNode {
+  color: #000088;
+}
+
+.selectorTag,
+.selectorId,
+.selectorClass {
+  font-family: Menlo, Andale Mono, monospace;
+  font-weight: normal;
+}
+
+.selectorTag {
+  color: #0000FF;
+}
+
+.selectorId {
+  color: DarkBlue;
+}
+
+.selectorClass {
+  color: red;
+}
+
+.selectorHidden > .selectorTag {
+  color: #5F82D9;
+}
+
+.selectorHidden > .selectorId {
+  color: #888888;
+}
+
+.selectorHidden > .selectorClass {
+  color: #D86060;
+}
+
+.selectorValue {
+  font-family: Menlo, Andale Mono, monospace;
+  font-style: italic;
+  color: #555555;
+}
+
+.panelNode-html {
+  -moz-box-sizing: padding-box;
+  padding: 4px 0 0 2px;
+}
+
+.nodeBox {
+  position: relative;
+  font-family: Menlo, Andale Mono, monospace;
+  padding-left: 13px;
+  -moz-user-select: -moz-none;
+}
+
+.nodeBox.search-selection {
+  -moz-user-select: text;
+}
+
+.twisty {
+  position: absolute;
+  left: 0px;
+  top: 0px;
+  width: 14px;
+  height: 14px;
+}
+
+.nodeChildBox {
+  margin-left: 12px;
+  display: none;
+}
+
+.nodeLabel,
+.nodeCloseLabel {
+  margin: -2px 2px 0 2px;
+  border: 2px solid transparent;
+  border-radius: 3px;
+  padding: 0 2px;
+  color: #000088;
+}
+
+.nodeCloseLabel {
+  display: none;
+}
+
+.nodeTag {
+  cursor: pointer;
+  color: blue;
+}
+
+.nodeValue {
+  color: #FF0000;
+  font-weight: normal;
+}
+
+.nodeText,
+.nodeComment {
+  margin: 0 2px;
+  vertical-align: top;
+}
+
+.nodeText {
+  color: #333333;
+}
+
+.docType {
+  position: absolute;
+  /* position DOCTYPE element above/outside the "nodeBox" that contains it */
+  /* Note: to be fixed in Bug #688439 */
+  top: -16px;
+  font-family: Menlo, Andale Mono, monospace;
+  padding-left: 8px;
+  color: #999;
+  white-space: nowrap;
+  font-style: italic;
+}
+
+.htmlNodeBox {
+  /* make room for DOCTYPE element to be rendered above/outside "nodeBox" */
+  /* Note: to be fixed in Bug #688439 */
+  margin-top: 16px;
+}
+
+.nodeWhiteSpace {
+  border: 1px solid LightGray;
+  white-space: pre;
+  margin-left: 1px;
+  color: gray;
+}
+
+.nodeWhiteSpace_Space {
+  border: 1px solid #ddd;
+}
+
+.nodeTextEntity {
+  border: 1px solid gray;
+  white-space: pre;
+  margin-left: 1px;
+}
+
+.nodeComment {
+  color: DarkGreen;
+}
+
+.nodeBox.highlightOpen > .nodeLabel {
+  background-color: #EEEEEE;
+}
+
+.nodeBox.highlightOpen > .nodeCloseLabel,
+.nodeBox.highlightOpen > .nodeChildBox,
+.nodeBox.open > .nodeCloseLabel,
+.nodeBox.open > .nodeChildBox {
+  display: block;
+}
+
+.nodeBox.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel {
+  border-color: Highlight;
+  background-color: Highlight;
+  color: HighlightText !important;
+}
+
+.nodeBox.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText {
+  color: inherit !important;
+}
+
+.nodeBox.highlighted > .nodeLabel {
+  border-color: Highlight !important;
+  background-color: cyan !important;
+  color: #000000 !important;
+}
+
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox,
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeText {
+  color: #000000 !important;
+}
+
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox,
+.nodeBox.nodeHidden .nodeCloseLabel,
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeText,
+.nodeBox.nodeHidden .nodeText {
+  color: #888888;
+}
+
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.nodeHidden .nodeCloseLabel > .nodeCloseLabelBox > .nodeTag {
+  color: #5F82D9;
+}
+
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue {
+  color: #D86060;
+}
+
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeText {
+  color: SkyBlue !important;
+}
+
+.nodeBox.mutated > .nodeLabel,
+.nodeAttr.mutated,
+.nodeValue.mutated,
+.nodeText.mutated,
+.nodeBox.mutated > .nodeText {
+  background-color: #EFFF79;
+  color: #FF0000 !important;
+}
+
+.nodeBox.selected.mutated > .nodeLabel,
+.nodeBox.selected.mutated > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr.mutated > .nodeValue,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue.mutated,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText.mutated {
+  background-color: #EFFF79;
+  border-color: #EFFF79;
+  color: #FF0000 !important;
+}
+
+.logRow-dirxml {
+  padding-left: 0;
+}
+
+.soloElement > .nodeBox  {
+  padding-left: 0;
+}
+
+.nodeBox.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel {
+  border-color: #3875d7;
+  background-color: #3875d7;
+  color: #FFFFFF !important;
+}
+
+.nodeBox.highlighted > .nodeLabel {
+  border-color: #3875d7 !important;
+}
+
+/* Twisties */
+
+.twisty
+{
+  background-repeat: no-repeat;
+  background-position: center;
+  background-image: url("chrome://global/skin/tree/twisty-clsd.png") !important;
+}
+
+.nodeBox.highlightOpen > .nodeLabel > .twisty,
+.nodeBox.open > .nodeLabel > .twisty
+{
+  background-image: url("chrome://global/skin/tree/twisty-open.png") !important;
+}
+
+.editingAttributeValue {
+  background-color: #492;
+}
+
+#attribute-editor {
+  visibility: hidden;
+  position: absolute;
+  z-index: 5000;
+  background-color: #fff;
+  border: 1px solid #000;
+}
+
+#attribute-editor.editing {
+  visibility: visible;
+}
+
+#attribute-editor-input {
+  border: none;
+  padding: 2px 5px;
+  font-family: Menlo, Andale Mono, monospace;
+  font-size: 11px;
+}
deleted file mode 100644
--- a/browser/themes/winstripe/inspector.css
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * Software License Agreement (BSD License)
- *
- * Copyright (c) 2007, Parakey Inc.
- * All rights reserved.
- * 
- * Redistribution and use of this software in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- * 
- * * Redistributions of source code must retain the above
- *   copyright notice, this list of conditions and the
- *   following disclaimer.
- * 
- * * Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the
- *   following disclaimer in the documentation and/or other
- *   materials provided with the distribution.
- * 
- * * Neither the name of Parakey Inc. nor the names of its
- *   contributors may be used to endorse or promote products
- *   derived from this software without specific prior
- *   written permission of Parakey Inc.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
- * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Creator:
- *  Joe Hewitt
- * Contributors
- *  John J. Barton (IBM Almaden)
- *  Jan Odvarko (Mozilla Corp.)
- *  Max Stepanov (Aptana Inc.)
- *  Rob Campbell (Mozilla Corp.)
- *  Hans Hillen (Paciello Group, Mozilla)
- *  Curtis Bartley (Mozilla Corp.)
- *  Mike Collins (IBM Almaden)
- *  Kevin Decker
- *  Mike Ratcliffe (Comartis AG)
- *  Hernan Rodríguez Colmeiro
- *  Austin Andrews
- *  Christoph Dorn
- *  Steven Roussey (AppCenter Inc, Network54)
- */
-
-html {
-  background-color: -moz-dialog;
-}
-
-body {
-  margin: 0;
-  overflow: auto;
-  font-family: Lucida Grande, sans-serif;
-  font-size: 11px;
-  padding-top: 5px;
-}
-
-h1 {
-  font-size: 17px;
-  border-bottom: 1px solid threedlightshadow;
-}
-
-a {
-  color: #0000ff;
-}
-
-pre {
-  margin: 0;
-  font: inherit;
-}
-
-code {
-  display: block;
-  white-space: pre;
-}
-
-/* DOMPlate */
-
-.objectLink-element,
-.objectLink-textNode,
-.objectLink-function,
-.objectBox-stackTrace,
-.objectLink-profile {
-  font-family: Menlo, Andale Mono, monospace;
-}
-
-.objectLink-textNode {
-  white-space: pre-wrap;
-}
-
-.objectLink-styleRule,
-.objectLink-element,
-.objectLink-textNode {
-  color: #000088;
-}
-
-.selectorTag,
-.selectorId,
-.selectorClass {
-  font-family: Menlo, Andale Mono, monospace;
-  font-weight: normal;
-}
-
-.selectorTag {
-  color: #0000FF;
-}
-
-.selectorId {
-  color: DarkBlue;
-}
-
-.selectorClass {
-  color: red;
-}
-
-.selectorHidden > .selectorTag {
-  color: #5F82D9;
-}
-
-.selectorHidden > .selectorId {
-  color: #888888;
-}
-
-.selectorHidden > .selectorClass {
-  color: #D86060;
-}
-
-.selectorValue {
-  font-family: Menlo, Andale Mono, monospace;
-  font-style: italic;
-  color: #555555;
-}
-
-.panelNode-html {
-  -moz-box-sizing: padding-box;
-  padding: 4px 0 0 2px;
-}
-
-.nodeBox {
-  position: relative;
-  font-family: Menlo, Andale Mono, monospace;
-  padding-left: 13px;
-  -moz-user-select: -moz-none;
-}
-
-.nodeBox.search-selection {
-  -moz-user-select: text;
-}
-
-.twisty {
-  position: absolute;
-  left: 0px;
-  top: 0px;
-  width: 14px;
-  height: 14px;
-}
-
-.nodeChildBox {
-  margin-left: 12px;
-  display: none;
-}
-
-.nodeLabel,
-.nodeCloseLabel {
-  margin: -2px 2px 0 2px;
-  border: 2px solid transparent;
-  border-radius: 3px;
-  padding: 0 2px;
-  color: #000088;
-}
-
-.nodeCloseLabel {
-  display: none;
-}
-
-.nodeTag {
-  cursor: pointer;
-  color: blue;
-}
-
-.nodeValue {
-  color: #FF0000;
-  font-weight: normal;
-}
-
-.nodeText,
-.nodeComment {
-  margin: 0 2px;
-  vertical-align: top;
-}
-
-.nodeText {
-  color: #333333;
-}
-
-.docType {
-  position: absolute;
-  /* position DOCTYPE element above/outside the "nodeBox" that contains it */
-  /* Note: to be fixed in Bug #688439 */
-  top: -16px;
-  font-family: Menlo, Andale Mono, monospace;
-  padding-left: 8px;
-  color: #999;
-  white-space: nowrap;
-  font-style: italic;
-}
-
-.htmlNodeBox {
-  /* make room for DOCTYPE element to be rendered above/outside "nodeBox" */
-  /* Note: to be fixed in Bug #688439 */
-  margin-top: 16px;
-}
-
-.nodeWhiteSpace {
-  border: 1px solid LightGray;
-  white-space: pre;
-  margin-left: 1px;
-  color: gray;
-}
-
-.nodeWhiteSpace_Space {
-  border: 1px solid #ddd;
-}
-
-.nodeTextEntity {
-  border: 1px solid gray;
-  white-space: pre;
-  margin-left: 1px;
-}
-
-.nodeComment {
-  color: DarkGreen;
-}
-
-.nodeBox.highlightOpen > .nodeLabel {
-  background-color: #EEEEEE;
-}
-
-.nodeBox.highlightOpen > .nodeCloseLabel,
-.nodeBox.highlightOpen > .nodeChildBox,
-.nodeBox.open > .nodeCloseLabel,
-.nodeBox.open > .nodeChildBox {
-  display: block;
-}
-
-.nodeBox.selected > .nodeLabel > .nodeLabelBox,
-.nodeBox.selected > .nodeLabel {
-  border-color: Highlight;
-  background-color: Highlight;
-  color: HighlightText !important;
-}
-
-.nodeBox.selected > .nodeLabel > .nodeLabelBox,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText {
-  color: inherit !important;
-}
-
-.nodeBox.highlighted > .nodeLabel {
-  border-color: Highlight !important;
-  background-color: cyan !important;
-  color: #000000 !important;
-}
-
-.nodeBox.highlighted > .nodeLabel > .nodeLabelBox,
-.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeTag,
-.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
-.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeText {
-  color: #000000 !important;
-}
-
-.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox,
-.nodeBox.nodeHidden .nodeCloseLabel,
-.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeText,
-.nodeBox.nodeHidden .nodeText {
-  color: #888888;
-}
-
-.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeTag,
-.nodeBox.nodeHidden .nodeCloseLabel > .nodeCloseLabelBox > .nodeTag {
-  color: #5F82D9;
-}
-
-.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue {
-  color: #D86060;
-}
-
-.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox,
-.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
-.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
-.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeText {
-  color: SkyBlue !important;
-}
-
-.nodeBox.mutated > .nodeLabel,
-.nodeAttr.mutated,
-.nodeValue.mutated,
-.nodeText.mutated,
-.nodeBox.mutated > .nodeText {
-  background-color: #EFFF79;
-  color: #FF0000 !important;
-}
-
-.nodeBox.selected.mutated > .nodeLabel,
-.nodeBox.selected.mutated > .nodeLabel > .nodeLabelBox,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr.mutated > .nodeValue,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue.mutated,
-.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText.mutated {
-  background-color: #EFFF79;
-  border-color: #EFFF79;
-  color: #FF0000 !important;
-}
-
-.logRow-dirxml {
-  padding-left: 0;
-}
-
-.soloElement > .nodeBox  {
-  padding-left: 0;
-}
-
-.nodeBox.selected > .nodeLabel > .nodeLabelBox,
-.nodeBox.selected > .nodeLabel {
-  border-color: #3875d7;
-  background-color: #3875d7;
-  color: #FFFFFF !important;
-}
-
-.nodeBox.highlighted > .nodeLabel {
-  border-color: #3875d7 !important;
-}
-
-/* Twisties */
-
-.twisty
-{
-  background-repeat: no-repeat;
-  background-position: center;
-  background-image: url("chrome://global/skin/tree/twisty-clsd.png") !important;
-}
-
-.nodeBox.highlightOpen > .nodeLabel > .twisty,
-.nodeBox.open > .nodeLabel > .twisty
-{
-  background-image: url("chrome://global/skin/tree/twisty-open.png") !important;
-}
-
-.editingAttributeValue {
-  background-color: #492;
-}
-
-#attribute-editor {
-  visibility: hidden;
-  position: absolute;
-  z-index: 5000;
-  background-color: #fff;
-  border: 1px solid #000;
-}
-
-#attribute-editor.editing {
-  visibility: visible;
-}
-
-#attribute-editor-input {
-  border: none;
-  padding: 2px 5px;
-  font-family: Menlo, Andale Mono, monospace;
-  font-size: 11px;
-}
--- a/browser/themes/winstripe/jar.mn
+++ b/browser/themes/winstripe/jar.mn
@@ -55,17 +55,16 @@ browser.jar:
         skin/classic/browser/feeds/audioFeedIcon16.png               (feeds/feedIcon16.png)
         skin/classic/browser/feeds/videoFeedIcon.png                 (feeds/feedIcon.png)
         skin/classic/browser/feeds/videoFeedIcon16.png               (feeds/feedIcon16.png)
         skin/classic/browser/feeds/subscribe.css                     (feeds/subscribe.css)
         skin/classic/browser/feeds/subscribe-ui.css                  (feeds/subscribe-ui.css)
         skin/classic/browser/newtab/newTab.css                       (newtab/newTab.css)
         skin/classic/browser/newtab/strip.png                        (newtab/strip.png)
         skin/classic/browser/newtab/toolbar.png                      (newtab/toolbar.png)
-        skin/classic/browser/inspector.css
         skin/classic/browser/places/places.css                       (places/places.css)
 *       skin/classic/browser/places/organizer.css                    (places/organizer.css)
         skin/classic/browser/places/bookmark.png                     (places/bookmark.png)
         skin/classic/browser/places/editBookmark.png                 (places/editBookmark.png)
         skin/classic/browser/places/query.png                        (places/query.png)
         skin/classic/browser/places/bookmarksMenu.png                (places/bookmarksMenu.png)
         skin/classic/browser/places/bookmarksToolbar.png             (places/bookmarksToolbar.png)
         skin/classic/browser/places/calendar.png                     (places/calendar.png)
@@ -107,19 +106,21 @@ browser.jar:
         skin/classic/browser/tabview/search.png                     (tabview/search.png)
         skin/classic/browser/tabview/stack-expander.png             (tabview/stack-expander.png)
         skin/classic/browser/tabview/tabview.png                    (tabview/tabview.png)
         skin/classic/browser/tabview/tabview-inverted.png           (tabview/tabview-inverted.png)
         skin/classic/browser/tabview/tabview.css                    (tabview/tabview.css)
         skin/classic/browser/devtools/common.css                    (devtools/common.css)
         skin/classic/browser/devtools/arrows.png                    (devtools/arrows.png)
         skin/classic/browser/devtools/commandline.png               (devtools/commandline.png)
+        skin/classic/browser/devtools/alerticon-warning.png         (devtools/alerticon-warning.png)
         skin/classic/browser/devtools/goto-mdn.png                  (devtools/goto-mdn.png)
         skin/classic/browser/devtools/csshtmltree.css               (devtools/csshtmltree.css)
         skin/classic/browser/devtools/gcli.css                      (devtools/gcli.css)
+        skin/classic/browser/devtools/htmlpanel.css                 (devtools/htmlpanel.css)
         skin/classic/browser/devtools/orion.css                     (devtools/orion.css)
         skin/classic/browser/devtools/orion-container.css           (devtools/orion-container.css)
         skin/classic/browser/devtools/orion-task.png                (devtools/orion-task.png)
         skin/classic/browser/devtools/orion-breakpoint.png          (devtools/orion-breakpoint.png)
         skin/classic/browser/devtools/toolbarbutton-close.png       (devtools/toolbarbutton-close.png)
         skin/classic/browser/devtools/webconsole.css                  (devtools/webconsole.css)
         skin/classic/browser/devtools/webconsole_networkpanel.css     (devtools/webconsole_networkpanel.css)
         skin/classic/browser/devtools/webconsole.png                  (devtools/webconsole.png)
@@ -224,17 +225,16 @@ browser.jar:
         skin/classic/aero/browser/feeds/audioFeedIcon16.png          (feeds/feedIcon16-aero.png)
         skin/classic/aero/browser/feeds/videoFeedIcon.png            (feeds/feedIcon-aero.png)
         skin/classic/aero/browser/feeds/videoFeedIcon16.png          (feeds/feedIcon16-aero.png)
         skin/classic/aero/browser/feeds/subscribe.css                (feeds/subscribe.css)
         skin/classic/aero/browser/feeds/subscribe-ui.css             (feeds/subscribe-ui.css)
         skin/classic/aero/browser/newtab/newTab.css                  (newtab/newTab.css)
         skin/classic/aero/browser/newtab/strip.png                   (newtab/strip.png)
         skin/classic/aero/browser/newtab/toolbar.png                 (newtab/toolbar.png)
-        skin/classic/aero/browser/inspector.css
 *       skin/classic/aero/browser/places/places.css                  (places/places-aero.css)
 *       skin/classic/aero/browser/places/organizer.css               (places/organizer-aero.css)
         skin/classic/aero/browser/places/bookmark.png                (places/bookmark.png)
         skin/classic/aero/browser/places/editBookmark.png            (places/editBookmark.png)
         skin/classic/aero/browser/places/query.png                   (places/query-aero.png)
         skin/classic/aero/browser/places/bookmarksMenu.png           (places/bookmarksMenu-aero.png)
         skin/classic/aero/browser/places/bookmarksToolbar.png        (places/bookmarksToolbar-aero.png)
         skin/classic/aero/browser/places/calendar.png                (places/calendar-aero.png)
@@ -276,19 +276,21 @@ browser.jar:
         skin/classic/aero/browser/tabview/search.png                 (tabview/search.png)
         skin/classic/aero/browser/tabview/stack-expander.png         (tabview/stack-expander.png)
         skin/classic/aero/browser/tabview/tabview.png                (tabview/tabview.png)
         skin/classic/aero/browser/tabview/tabview-inverted.png       (tabview/tabview-inverted.png)
         skin/classic/aero/browser/tabview/tabview.css                (tabview/tabview.css)
         skin/classic/aero/browser/devtools/common.css                (devtools/common.css)
         skin/classic/aero/browser/devtools/arrows.png                (devtools/arrows.png)
         skin/classic/aero/browser/devtools/commandline.png           (devtools/commandline.png)
+        skin/classic/aero/browser/devtools/alerticon-warning.png     (devtools/alerticon-warning.png)
         skin/classic/aero/browser/devtools/goto-mdn.png              (devtools/goto-mdn.png)
         skin/classic/aero/browser/devtools/csshtmltree.css           (devtools/csshtmltree.css)
         skin/classic/aero/browser/devtools/gcli.css                  (devtools/gcli.css)
+        skin/classic/aero/browser/devtools/htmlpanel.css             (devtools/htmlpanel.css)
         skin/classic/aero/browser/devtools/orion.css                 (devtools/orion.css)
         skin/classic/aero/browser/devtools/orion-container.css       (devtools/orion-container.css)
         skin/classic/aero/browser/devtools/orion-task.png            (devtools/orion-task.png)
         skin/classic/aero/browser/devtools/orion-breakpoint.png      (devtools/orion-breakpoint.png)
         skin/classic/aero/browser/devtools/toolbarbutton-close.png   (devtools/toolbarbutton-close.png)
         skin/classic/aero/browser/devtools/webconsole.css                  (devtools/webconsole.css)
         skin/classic/aero/browser/devtools/webconsole_networkpanel.css     (devtools/webconsole_networkpanel.css)
         skin/classic/aero/browser/devtools/webconsole.png                  (devtools/webconsole.png)
index c25c98053b045908ecb130bac2bebab64dbef7bb..7cea7bdd8f7f073156e7fe505fa842ded15195c0
GIT binary patch
literal 237
zc$@+4022R+P)<h;3K|Lk000e1NJLTq000mG000sQ1^@s6QafI10002ANkl<Zc-qC&
zzYBsu7{>AL-*^ccYiLxWu^aj^bq(TDs8CCYtwDeMQ;)>Up$?uQ4Iem8`EvK7697LM
zJz!{PKzyMA^C8nk4EhF4aA0K}C?sG!V%-I#0o5Ilrd?8ix}IskKk{t3#yr~8VtYhV
zRK&IJ^Bp}=GZ0yaLwc>btVCYDh-=-CyqR=eVedQNpCGOqq}LEn`2*B%i0zQLtO5=G
n4z}qH6dq{LME>$KsZj%O*eX1Hw;$xg00000NkvXXu0mjfUa(*y
index 46f6d50e099d3449df363cdb1d4dcb88c5eb0dd5..960d4d75a826afe784389b9b98f308b969742c12
GIT binary patch
literal 926
zc$@*A17ZA$P)<h;3K|Lk000e1NJLTq003G5000sQ1^@s6+oQ<?000AJNkl<Zc-rll
z%TE(g6vpd+V7J8tFvg$|D9>Vfl)j)3`k<wS&=x3E5h{p)kA;y)bYY^=?Svf(8rZTR
zX;^4LiQ$jB-fv`jZ%#WZnZ^vp#h26bo$vlKJ)LAGwb+^*WiiIC=&4%n{4>=rIXbz2
zo}(?!%4PclS#>-xF2ZT75yyHtIAYPZn_Zs0TRpz-&Ar2?RPZsEbFwF0kgc)Rd2+qg
z$!^&DD+C{No@=iON92TOQjT_;+uHiW$C1gxZalNFLj@mmIVXEyXq@(eAPXdCSU5dL
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
 keyhi.h
 cryptohi.h
 crmf.h
--- a/configure.in
+++ b/configure.in
@@ -5152,20 +5152,20 @@ incorrect])
                       MOZ_ENABLE_QTMOBILITY=)
     if test "$MOZ_ENABLE_QTMOBILITY"; then
        MOZ_ENABLE_QTMOBILITY=1
        MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS $_QTMOBILITY_CFLAGS"
        MOZ_QT_LIBS="$MOZ_QT_LIBS $_QTMOBILITY_LIBS"
     else
        AC_CHECK_LIB(QtSensors, main, [
           MOZ_ENABLE_QTMOBILITY=1
-          MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I/usr/include/qt4/QtMobility"
-          MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I/usr/include/qt4/QtSensors"
-          MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I/usr/include/qt4/QtFeedback"
-          MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I/usr/include/qt4/QtLocation"
+          MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtMobility"
+          MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtSensors"
+          MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtFeedback"
+          MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtLocation"
           MOZ_QT_LIBS="$MOZ_QT_LIBS -lQtSensors -lQtFeedback -lQtLocation"
        ])
     fi
     if test "$MOZ_ENABLE_QTMOBILITY"; then
        AC_DEFINE(MOZ_ENABLE_QTMOBILITY)
     fi
 fi
 
--- a/content/base/public/Element.h
+++ b/content/base/public/Element.h
@@ -100,18 +100,16 @@ public:
   Element(already_AddRefed<nsINodeInfo> aNodeInfo) :
     nsIContent(aNodeInfo),
     mState(NS_EVENT_STATE_MOZ_READONLY)
   {}
 #endif // MOZILLA_INTERNAL_API
 
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ELEMENT_IID)
 
-  NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(Element, nsIContent)
-
   /**
    * Method to get the full state of this element.  See nsEventStates.h for
    * the possible bits that could be set here.
    */
   nsEventStates State() const {
     // mState is maintained by having whoever might have changed it
     // call UpdateState() or one of the other mState mutators.
     return mState;
--- a/content/base/public/nsContentUtils.h
+++ b/content/base/public/nsContentUtils.h
@@ -417,18 +417,18 @@ public:
 
   template<bool IsWhitespace(PRUnichar)>
   static const nsDependentSubstring TrimWhitespace(const nsAString& aStr,
                                                    bool aTrimTrailing = true);
 
   /**
    * Returns true if aChar is of class Ps, Pi, Po, Pf, or Pe.
    */
-  static bool IsPunctuationMark(PRUint32 aChar);
-  static bool IsPunctuationMarkAt(const nsTextFragment* aFrag, PRUint32 aOffset);
+  static bool IsFirstLetterPunctuation(PRUint32 aChar);
+  static bool IsFirstLetterPunctuationAt(const nsTextFragment* aFrag, PRUint32 aOffset);
  
   /**
    * Returns true if aChar is of class Lu, Ll, Lt, Lm, Lo, Nd, Nl or No
    */
   static bool IsAlphanumeric(PRUint32 aChar);
   static bool IsAlphanumericAt(const nsTextFragment* aFrag, PRUint32 aOffset);
 
   /*
--- a/content/base/public/nsIContent.h
+++ b/content/base/public/nsIContent.h
@@ -99,18 +99,16 @@ public:
   {
     NS_ASSERTION(mNodeInfo,
                  "No nsINodeInfo passed to nsIContent, PREPARE TO CRASH!!!");
   }
 #endif // MOZILLA_INTERNAL_API
 
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENT_IID)
 
-  NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsIContent, nsINode);
-
   /**
    * Bind this content node to a tree.  If this method throws, the caller must
    * call UnbindFromTree() on the node.  In the typical case of a node being
    * appended to a parent, this will be called after the node has been added to
    * the parent's child list and before nsIDocumentObserver notifications for
    * the addition are dispatched.
    * @param aDocument The new document for the content node.  Must match the
    *                  current document of aParent, if aParent is not null.
@@ -994,14 +992,13 @@ public:
   };
 
   // Tab focus model bit field:
   static PRInt32 sTabFocusModel;
 
   // accessibility.tabfocus_applies_to_xul pref - if it is set to true,
   // the tabfocus bit field applies to xul elements.
   static bool sTabFocusModelAppliesToXUL;
-
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsIContent, NS_ICONTENT_IID)
 
 #endif /* nsIContent_h___ */
--- a/content/base/public/nsIDocument.h
+++ b/content/base/public/nsIDocument.h
@@ -106,16 +106,17 @@ class nsBindingManager;
 class nsIDOMNodeList;
 class mozAutoSubtreeModified;
 struct JSObject;
 class nsFrameLoader;
 class nsIBoxObject;
 class imgIRequest;
 class nsISHEntry;
 class nsDOMNavigationTiming;
+class nsWindowSizes;
 
 namespace mozilla {
 namespace css {
 class Loader;
 } // namespace css
 
 namespace dom {
 class Link;
@@ -151,17 +152,16 @@ enum DocumentFlavor {
 // Gecko.
 class nsIDocument : public nsINode
 {
 public:
   typedef mozilla::dom::Element Element;
 
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_IID)
   NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
-  NS_DECL_DOM_MEMORY_REPORTER_SIZEOF
 
 #ifdef MOZILLA_INTERNAL_API
   nsIDocument()
     : nsINode(nsnull),
       mCharacterSet(NS_LITERAL_CSTRING("ISO-8859-1")),
       mNodeInfoManager(nsnull),
       mCompatMode(eCompatibility_FullStandards),
       mIsInitialDocumentInWindow(false),
@@ -1612,17 +1612,25 @@ public:
 
   void SetNeedStyleFlush() {
     mNeedStyleFlush = true;
     if (mDisplayDocument) {
       mDisplayDocument->SetNeedStyleFlush();
     }
   }
 
-  virtual size_t SizeOfStyleSheets(nsMallocSizeOfFun aMallocSizeOf) const = 0;
+  // Note: nsIDocument is a sub-class of nsINode, which has a
+  // SizeOfExcludingThis function.  However, because nsIDocument objects can
+  // only appear at the top of the DOM tree, we have a specialized measurement
+  // function which returns multiple sizes.
+  virtual void DocSizeOfExcludingThis(nsWindowSizes* aWindowSizes) const;
+  // DocSizeOfIncludingThis doesn't need to be overridden by sub-classes
+  // because nsIDocument inherits from nsINode;  see the comment above the
+  // declaration of nsINode::SizeOfIncludingThis.
+  virtual void DocSizeOfIncludingThis(nsWindowSizes* aWindowSizes) const;
 
 private:
   PRUint64 mWarnedAbout;
 
 protected:
   ~nsIDocument()
   {
     // XXX The cleanup of mNodeInfoManager (calling DropDocumentReference and
--- a/content/base/public/nsINode.h
+++ b/content/base/public/nsINode.h
@@ -297,17 +297,49 @@ private:
  * of nsIContent children and provides access to them.
  */
 class nsINode : public nsIDOMEventTarget,
                 public nsWrapperCache
 {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_INODE_IID)
 
-  NS_DECL_DOM_MEMORY_REPORTER_SIZEOF
+  // Among the sub-classes that inherit (directly or indirectly) from nsINode,
+  // measurement of the following members may be added later if DMD finds it is
+  // worthwhile:
+  // - nsGenericHTMLElement:  mForm, mFieldSet
+  // - nsGenericHTMLFrameElement: mFrameLoader (bug 672539), mTitleChangedListener
+  // - nsHTMLBodyElement:     mContentStyleRule
+  // - nsHTMLDataListElement: mOptions
+  // - nsHTMLFieldSetElement: mElements, mDependentElements, mFirstLegend
+  // - nsHTMLFormElement:     many!
+  // - nsHTMLFrameSetElement: mRowSpecs, mColSpecs
+  // - nsHTMLInputElement:    mInputData, mFiles, mFileList, mStaticDocfileList
+  // - nsHTMLMapElement:      mAreas
+  // - nsHTMLMediaElement:    many!
+  // - nsHTMLOutputElement:   mDefaultValue, mTokenList
+  // - nsHTMLRowElement:      mCells
+  // - nsHTMLSelectElement:   mOptions, mRestoreState
+  // - nsHTMLTableElement:    mTBodies, mRows, mTableInheritedAttributes
+  // - nsHTMLTableSectionElement: mRows
+  // - nsHTMLTextAreaElement: mControllers, mState
+  //
+  // The following members don't need to be measured:
+  // - nsIContent: mPrimaryFrame, because it's non-owning and measured elsewhere
+  //
+  NS_DECL_SIZEOF_EXCLUDING_THIS
+
+  // SizeOfIncludingThis doesn't need to be overridden by sub-classes because
+  // sub-classes of nsINode are guaranteed to be laid out in memory in such a
+  // way that |this| points to the start of the allocated object, even in
+  // methods of nsINode's sub-classes, and so |aMallocSizeOf(this)| is always
+  // safe to call no matter which object it was invoked on.
+  virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const {
+    return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
+  }
 
   friend class nsNodeUtils;
   friend class nsNodeWeakReference;
   friend class nsNodeSupportsWeakRefTearoff;
   friend class nsAttrAndChildArray;
 
 #ifdef MOZILLA_INTERNAL_API
   nsINode(already_AddRefed<nsINodeInfo> aNodeInfo)
@@ -1326,16 +1358,17 @@ protected:
   void SetHasLockedStyleStates() { SetBoolFlag(ElementHasLockedStyleStates); }
   void ClearHasLockedStyleStates() { ClearBoolFlag(ElementHasLockedStyleStates); }
   bool HasLockedStyleStates() const
     { return GetBoolFlag(ElementHasLockedStyleStates); }
 
 public:
   // Optimized way to get classinfo.
   virtual nsXPCClassInfo* GetClassInfo() = 0;
+
 protected:
 
   // Override this function to create a custom slots class.
   virtual nsINode::nsSlots* CreateSlots();
 
   bool HasSlots() const
   {
     return mSlots != nsnull;
--- a/content/base/src/Makefile.in
+++ b/content/base/src/Makefile.in
@@ -205,16 +205,17 @@ INCLUDES	+= \
 		-I$(topsrcdir)/xpcom/io \
 		-I$(topsrcdir)/dom/ipc \
 		-I$(topsrcdir)/js/xpconnect/src \
 		-I$(topsrcdir)/caps/include \
 		-I$(topsrcdir)/netwerk/base/src \
 		$(NULL)
 
 DEFINES += -D_IMPL_NS_LAYOUT
+DEFINES += -DHB_DONT_DEFINE_STDINT
 
 # gcc requires -msse2 for this file since it uses SSE2 intrinsics.  (See bug
 # 585538 comment 12.)
 ifneq (,$(INTEL_ARCHITECTURE))
 ifdef GNU_CC
 nsTextFragmentSSE2.$(OBJ_SUFFIX): CXXFLAGS+=-msse2
 endif
 
--- a/content/base/src/nsAttrAndChildArray.cpp
+++ b/content/base/src/nsAttrAndChildArray.cpp
@@ -834,31 +834,27 @@ nsAttrAndChildArray::SetChildAtPos(void*
   }
   if (aIndex != aChildCount) {
     nsIContent* next = static_cast<nsIContent*>(*(aPos + 1));
     aChild->mNextSibling = next;
     next->mPreviousSibling = aChild;
   }
 }
 
-PRInt64
-nsAttrAndChildArray::SizeOf() const
+size_t
+nsAttrAndChildArray::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
 {
-  PRInt64 size = sizeof(*this);
-
+  size_t n = 0;
   if (mImpl) {
     // Don't add the size taken by *mMappedAttrs because it's shared.
 
-    // mBuffer cointains InternalAttr and nsIContent* (even if it's void**)
-    // so, we just have to compute the size of *mBuffer given that this object
-    // doesn't own the children list.
-    size += mImpl->mBufferSize * sizeof(*(mImpl->mBuffer)) + NS_IMPL_EXTRA_SIZE;
+    n += aMallocSizeOf(mImpl);
 
     PRUint32 slotCount = AttrSlotCount();
     for (PRUint32 i = 0; i < slotCount && AttrSlotIsTaken(i); ++i) {
       nsAttrValue* value = &ATTRS(mImpl)[i].mValue;
-      size += value->SizeOf() - sizeof(*value);
+      n += value->SizeOfExcludingThis(aMallocSizeOf);
     }
   }
 
-  return size;
+  return n;
 }
 
--- a/content/base/src/nsAttrAndChildArray.h
+++ b/content/base/src/nsAttrAndChildArray.h
@@ -130,17 +130,17 @@ public:
   void Compact();
 
   bool CanFitMoreAttrs() const
   {
     return AttrSlotCount() < ATTRCHILD_ARRAY_MAX_ATTR_COUNT ||
            !AttrSlotIsTaken(ATTRCHILD_ARRAY_MAX_ATTR_COUNT - 1);
   }
 
-  PRInt64 SizeOf() const;
+  size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
   bool HasMappedAttrs() const
   {
     return MappedAttrCount();
   }
 
 private:
   nsAttrAndChildArray(const nsAttrAndChildArray& aOther) MOZ_DELETE;
   nsAttrAndChildArray& operator=(const nsAttrAndChildArray& aOther) MOZ_DELETE;
--- a/content/base/src/nsAttrValue.cpp
+++ b/content/base/src/nsAttrValue.cpp
@@ -1762,64 +1762,55 @@ nsAttrValue::StringToInteger(const nsASt
     if (!value) {
       *aStrict = false;
     }
   }
 
   return value;
 }
 
-PRInt64
-nsAttrValue::SizeOf() const
+size_t
+nsAttrValue::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
 {
-  PRInt64 size = sizeof(*this);
+  size_t n = 0;
 
   switch (BaseType()) {
     case eStringBase:
     {
-      // TODO: we might be counting the string size more than once.
-      // This should be fixed with bug 677487.
       nsStringBuffer* str = static_cast<nsStringBuffer*>(GetPtr());
-      size += str ? str->StorageSize() : 0;
+      n += str ? str->SizeOfIncludingThisIfUnshared(aMallocSizeOf) : 0;
       break;
     }
     case eOtherBase:
     {
       MiscContainer* container = GetMiscContainer();
-
       if (!container) {
         break;
       }
-
-      size += sizeof(*container);
+      n += aMallocSizeOf(container);
 
       void* otherPtr = MISC_STR_PTR(container);
       // We only count the size of the object pointed by otherPtr if it's a
       // string. When it's an atom, it's counted separatly.
       if (otherPtr &&
           static_cast<ValueBaseType>(container->mStringBits & NS_ATTRVALUE_BASETYPE_MASK) == eStringBase) {
-        // TODO: we might be counting the string size more than once.
-        // This should be fixed with bug 677487.
         nsStringBuffer* str = static_cast<nsStringBuffer*>(otherPtr);
-        size += str ? str->StorageSize() : 0;
+        n += str ? str->SizeOfIncludingThisIfUnshared(aMallocSizeOf) : 0;
       }
 
-      // TODO: mCSSStyleRule might be owned by another object
-      // which would make us count them twice, bug 677493.
       if (Type() == eCSSStyleRule && container->mCSSStyleRule) {
-        // TODO: Add SizeOf() to StyleRule, bug 677503.
-        size += sizeof(*container->mCSSStyleRule);
+        // TODO: mCSSStyleRule might be owned by another object which would
+        //       make us count them twice, bug 677493.
+        //n += container->mCSSStyleRule->SizeOfIncludingThis(aMallocSizeOf);
       } else if (Type() == eAtomArray && container->mAtomArray) {
-        size += sizeof(container->mAtomArray) + sizeof(nsTArrayHeader);
-        size += container->mAtomArray->Capacity() * sizeof(nsCOMPtr<nsIAtom>);
-        // Don't count the size of each nsIAtom, they are counted separatly.
+        // Don't measure each nsIAtom, they are measured separatly.
+        n += container->mAtomArray->SizeOfIncludingThis(aMallocSizeOf);
       }
-
       break;
     }
-    case eAtomBase:    // Atoms are counted separatly.
+    case eAtomBase:    // Atoms are counted separately.
     case eIntegerBase: // The value is in mBits, nothing to do.
       break;
   }
 
-  return size;
+  return n;
 }
 
--- a/content/base/src/nsAttrValue.h
+++ b/content/base/src/nsAttrValue.h
@@ -371,17 +371,17 @@ public:
    * Parse a margin string of format 'top, right, bottom, left' into
    * an nsIntMargin.
    *
    * @param aString the string to parse
    * @return whether the value could be parsed
    */
   bool ParseIntMarginValue(const nsAString& aString);
 
-  PRInt64 SizeOf() const;
+  size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
 
 private:
   // These have to be the same as in ValueType
   enum ValueBaseType {
     eStringBase =    eString,    // 00
     eOtherBase =     0x01,       // 01
     eAtomBase =      eAtom,      // 10
     eIntegerBase =   0x03        // 11
--- a/content/base/src/nsCommentNode.cpp
+++ b/content/base/src/nsCommentNode.cpp
@@ -58,20 +58,16 @@ public:
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE(nsGenericDOMDataNode::)
 
   // nsIDOMCharacterData
   NS_FORWARD_NSIDOMCHARACTERDATA(nsGenericDOMDataNode::)
 
-  // DOM Memory Reporter participant.
-  NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsCommentNode,
-                                              nsGenericDOMDataNode)
-
   // nsIDOMComment
   // Empty interface
 
   // nsINode
   virtual bool IsNodeOfType(PRUint32 aFlags) const;
 
   virtual nsGenericDOMDataNode* CloneDataNode(nsINodeInfo *aNodeInfo,
                                               bool aCloneText) const;
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -118,16 +118,17 @@
 #include "nsIXTFService.h"
 static NS_DEFINE_CID(kXTFServiceCID, NS_XTFSERVICE_CID);
 #endif
 #include "nsIMIMEService.h"
 #include "nsLWBrkCIID.h"
 #include "nsILineBreaker.h"
 #include "nsIWordBreaker.h"
 #include "nsUnicodeProperties.h"
+#include "harfbuzz/hb-common.h"
 #include "jsdbgapi.h"
 #include "nsIJSRuntimeService.h"
 #include "nsIDOMDocumentXBL.h"
 #include "nsBindingManager.h"
 #include "nsIURI.h"
 #include "nsIURL.h"
 #include "nsXBLBinding.h"
 #include "nsXBLPrototypeBinding.h"
@@ -1112,44 +1113,48 @@ nsContentUtils::CopyNewlineNormalizedUni
   WritingIterator iter;
   aDest.BeginWriting(iter);
   sink_traits dest_traits(iter);
   CopyNormalizeNewlines<sink_traits> normalizer(&dest_traits);
   copy_string(aSrcStart, aSrcEnd, normalizer);
   return normalizer.GetCharsWritten();
 }
 
-// Replaced by precompiled CCMap (see bug 180266). To update the list
-// of characters, see one of files included below. As for the way
-// the original list of characters was obtained by Frank Tang, see bug 54467.
-// Updated to fix the regression (bug 263411). The list contains
-// characters of the following Unicode character classes : Ps, Pi, Po, Pf, Pe.
-// (ref.: http://www.w3.org/TR/2004/CR-CSS21-20040225/selector.html#first-letter)
-#include "punct_marks.x-ccmap"
-DEFINE_X_CCMAP(gPuncCharsCCMapExt, const);
+/**
+ * This is used to determine whether a character is in one of the punctuation
+ * mark classes which CSS says should be part of the first-letter.
+ * See http://www.w3.org/TR/CSS2/selector.html#first-letter and
+ *     http://www.w3.org/TR/selectors/#first-letter
+ */
 
 // static
 bool
-nsContentUtils::IsPunctuationMark(PRUint32 aChar)
-{
-  return CCMAP_HAS_CHAR_EXT(gPuncCharsCCMapExt, aChar);
+nsContentUtils::IsFirstLetterPunctuation(PRUint32 aChar)
+{
+  PRUint8 cat = mozilla::unicode::GetGeneralCategory(aChar);
+
+  return (cat == HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION ||     // Ps
+          cat == HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION ||    // Pe
+          cat == HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION ||  // Pi
+          cat == HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION ||    // Pf
+          cat == HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION);     // Po
 }
 
 // static
 bool
-nsContentUtils::IsPunctuationMarkAt(const nsTextFragment* aFrag, PRUint32 aOffset)
+nsContentUtils::IsFirstLetterPunctuationAt(const nsTextFragment* aFrag, PRUint32 aOffset)
 {
   PRUnichar h = aFrag->CharAt(aOffset);
   if (!IS_SURROGATE(h)) {
-    return IsPunctuationMark(h);
+    return IsFirstLetterPunctuation(h);
   }
   if (NS_IS_HIGH_SURROGATE(h) && aOffset + 1 < aFrag->GetLength()) {
     PRUnichar l = aFrag->CharAt(aOffset + 1);
     if (NS_IS_LOW_SURROGATE(l)) {
-      return IsPunctuationMark(SURROGATE_TO_UCS4(h, l));
+      return IsFirstLetterPunctuation(SURROGATE_TO_UCS4(h, l));
     }
   }
   return false;
 }
 
 // static
 bool nsContentUtils::IsAlphanumeric(PRUint32 aChar)
 {
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -8481,29 +8481,16 @@ nsDocument::CreateTouchList(nsIVariant* 
       nsMemory::Free(rawArray);
     }
   }
 
   *aRetVal = retval.forget().get();
   return NS_OK;
 }
 
-PRInt64
-nsIDocument::SizeOf() const
-{
-  PRInt64 size = MemoryReporter::GetBasicSize<nsIDocument, nsINode>(this);
-
-  for (nsIContent* node = GetFirstChild(); node;
-       node = node->GetNextNode(this)) {
-    size += node->SizeOf();
-  }
-
-  return size;
-}
-
 static void
 DispatchFullScreenChange(nsIDocument* aTarget)
 {
   nsRefPtr<nsAsyncDOMEvent> e =
     new nsAsyncDOMEvent(aTarget,
                         NS_LITERAL_STRING("mozfullscreenchange"),
                         true,
                         false);
@@ -9079,24 +9066,16 @@ nsDocument::IsFullScreenEnabled(bool aCa
       return false;
     }
     node = nsContentUtils::GetCrossDocParentNode(node);
   } while (node);
 
   return true;
 }
 
-PRInt64
-nsDocument::SizeOf() const
-{
-  PRInt64 size = MemoryReporter::GetBasicSize<nsDocument, nsIDocument>(this);
-  size += mAttrStyleSheet ? mAttrStyleSheet->DOMSizeOf() : 0;
-  return size;
-}
-
 #define EVENT(name_, id_, type_, struct_)                                 \
   NS_IMETHODIMP nsDocument::GetOn##name_(JSContext *cx, jsval *vp) {      \
     return nsINode::GetOn##name_(cx, vp);                                 \
   }                                                                       \
   NS_IMETHODIMP nsDocument::SetOn##name_(JSContext *cx, const jsval &v) { \
     return nsINode::SetOn##name_(cx, v);                                  \
   }
 #define TOUCH_EVENT EVENT
@@ -9159,22 +9138,70 @@ nsDocument::GetMozVisibilityState(nsAStr
     "hidden",
     "visible"
   };
   PR_STATIC_ASSERT(NS_ARRAY_LENGTH(states) == eVisibilityStateCount);
   aState.AssignASCII(states[mVisibilityState]);
   return NS_OK;
 }
 
+/* virtual */ void
+nsIDocument::DocSizeOfExcludingThis(nsWindowSizes* aWindowSizes) const
+{
+  aWindowSizes->mDOM +=
+    nsINode::SizeOfExcludingThis(aWindowSizes->mMallocSizeOf);
+
+  // Measurement of the following members may be added later if DMD finds it
+  // is worthwhile:
+  // - many!
+}
+
+void
+nsIDocument::DocSizeOfIncludingThis(nsWindowSizes* aWindowSizes) const
+{
+  aWindowSizes->mDOM += aWindowSizes->mMallocSizeOf(this);
+  DocSizeOfExcludingThis(aWindowSizes);
+}
+
 static size_t
 SizeOfStyleSheetsElementIncludingThis(nsIStyleSheet* aStyleSheet,
                                       nsMallocSizeOfFun aMallocSizeOf,
                                       void* aData)
 {
   return aStyleSheet->SizeOfIncludingThis(aMallocSizeOf);
 }
 
-/* virtual */ size_t
-nsDocument::SizeOfStyleSheets(nsMallocSizeOfFun aMallocSizeOf) const
-{
-  return mStyleSheets.SizeOfExcludingThis(SizeOfStyleSheetsElementIncludingThis,
-                                          aMallocSizeOf); 
-}
+size_t
+nsDocument::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
+{
+  // This SizeOfExcludingThis() overrides the one from nsINode.  But
+  // nsDocuments can only appear at the top of the DOM tree, and we use the
+  // specialized DocSizeOfExcludingThis() in that case.  So this should never
+  // be called.
+  MOZ_NOT_REACHED("nsDocument::SizeOfExcludingThis");
+  return 0;
+}
+
+void
+nsDocument::DocSizeOfExcludingThis(nsWindowSizes* aWindowSizes) const
+{
+  nsIDocument::DocSizeOfExcludingThis(aWindowSizes);
+
+  for (nsIContent* node = nsINode::GetFirstChild();
+       node;
+       node = node->GetNextNode(this))
+  {
+    aWindowSizes->mDOM +=
+      node->SizeOfIncludingThis(aWindowSizes->mMallocSizeOf);
+  }
+
+  aWindowSizes->mStyleSheets +=
+    mStyleSheets.SizeOfExcludingThis(SizeOfStyleSheetsElementIncludingThis,
+                                     aWindowSizes->mMallocSizeOf); 
+  aWindowSizes->mDOM +=
+    mAttrStyleSheet ?
+    mAttrStyleSheet->DOMSizeOfIncludingThis(aWindowSizes->mMallocSizeOf) :
+    0;
+
+  // Measurement of the following members may be added later if DMD finds it
+  // is worthwhile:
+  // - many!
+}
--- a/content/base/src/nsDocument.h
+++ b/content/base/src/nsDocument.h
@@ -118,16 +118,17 @@ class nsIFormControl;
 struct nsRadioGroupStruct;
 class nsOnloadBlocker;
 class nsUnblockOnloadEvent;
 class nsChildContentList;
 class nsXMLEventsManager;
 class nsHTMLStyleSheet;
 class nsHTMLCSSStyleSheet;
 class nsDOMNavigationTiming;
+class nsWindowSizes;
 
 /**
  * Right now our identifier map entries contain information for 'name'
  * and 'id' mappings of a given string. This is so that
  * nsHTMLDocument::ResolveName only has to do one hash lookup instead
  * of two. It's not clear whether this still matters for performance.
  * 
  * We also store the document.all result list here. This is mainly so that
@@ -500,17 +501,18 @@ class nsDocument : public nsIDocument,
                    public nsStubMutationObserver,
                    public nsIDOMDocumentTouch,
                    public nsIInlineEventHandlers
 {
 public:
   typedef mozilla::dom::Element Element;
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_DOM_MEMORY_REPORTER_SIZEOF
+
+  NS_DECL_SIZEOF_EXCLUDING_THIS
 
   using nsINode::GetScriptTypeID;
 
   virtual void Reset(nsIChannel *aChannel, nsILoadGroup *aLoadGroup);
   virtual void ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup,
                           nsIPrincipal* aPrincipal);
 
   // StartDocumentLoad is pure virtual so that subclasses must override it.
@@ -985,17 +987,18 @@ public:
   Element* FullScreenStackTop();
 
   // This method may fire a DOM event; if it does so it will happen
   // synchronously.
   void UpdateVisibilityState();
   // Posts an event to call UpdateVisibilityState
   virtual void PostVisibilityUpdateEvent();
 
-  virtual size_t SizeOfStyleSheets(nsMallocSizeOfFun aMallocSizeOf) const;
+  virtual void DocSizeOfExcludingThis(nsWindowSizes* aWindowSizes) const;
+  // DocSizeOfIncludingThis is inherited from nsIDocument.
 
 protected:
   friend class nsNodeUtils;
 
   // Returns true if a request for DOM full-screen is currently enabled in
   // this document. This returns true if there are no windowed plugins in this
   // doc tree, and if the document is visible, and if the api is not
   // disabled by pref. aIsCallerChrome must contain the return value of
--- a/content/base/src/nsGenericDOMDataNode.cpp
+++ b/content/base/src/nsGenericDOMDataNode.cpp
@@ -992,17 +992,16 @@ nsGenericDOMDataNode::GetAttributeChange
 }
 
 nsIAtom*
 nsGenericDOMDataNode::GetClassAttributeName() const
 {
   return nsnull;
 }
 
-PRInt64
-nsGenericDOMDataNode::SizeOf() const
+size_t
+nsGenericDOMDataNode::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
 {
-  PRInt64 size = dom::MemoryReporter::GetBasicSize<nsGenericDOMDataNode,
-                                                   nsIContent>(this);
-  size += mText.SizeOf() - sizeof(mText);
-  return size;
+  size_t n = nsIContent::SizeOfExcludingThis(aMallocSizeOf);
+  n += mText.SizeOfExcludingThis(aMallocSizeOf);
+  return n;
 }
 
--- a/content/base/src/nsGenericDOMDataNode.h
+++ b/content/base/src/nsGenericDOMDataNode.h
@@ -74,17 +74,17 @@ class nsIDOMText;
 class nsINodeInfo;
 class nsURI;
 
 class nsGenericDOMDataNode : public nsIContent
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
-  NS_DECL_DOM_MEMORY_REPORTER_SIZEOF
+  NS_DECL_SIZEOF_EXCLUDING_THIS
 
   nsGenericDOMDataNode(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual ~nsGenericDOMDataNode();
 
   // Implementation for nsIDOMNode
   nsresult GetNodeName(nsAString& aNodeName)
   {
     aNodeName = NodeName();
--- a/content/base/src/nsGenericElement.cpp
+++ b/content/base/src/nsGenericElement.cpp
@@ -6192,39 +6192,42 @@ nsGenericElement::MozMatchesSelector(con
   NS_PRECONDITION(aReturn, "Null out param?");
 
   nsresult rv;
   *aReturn = MozMatchesSelector(aSelector, &rv);
 
   return rv;
 }
 
-PRInt64
-nsINode::SizeOf() const
-{
-  PRInt64 size = sizeof(*this);
-
+size_t
+nsINode::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
+{
+  size_t n = 0;
   nsEventListenerManager* elm =
     const_cast<nsINode*>(this)->GetListenerManager(false);
   if (elm) {
-    size += elm->SizeOf();
-  }
-
-  return size;
-}
-
-PRInt64
-nsGenericElement::SizeOf() const
-{
-  PRInt64 size = MemoryReporter::GetBasicSize<nsGenericElement, Element>(this);
-
-  size -= sizeof(mAttrsAndChildren);
-  size += mAttrsAndChildren.SizeOf();
-
-  return size;
+    n += elm->SizeOfIncludingThis(aMallocSizeOf);
+  }
+
+  // Measurement of the following members may be added later if DMD finds it is
+  // worthwhile:
+  // - mNodeInfo (Nb: allocated in nsNodeInfo.cpp with a nsFixedSizeAllocator)
+  // - mSlots
+  //
+  // The following members are not measured:
+  // - mParent, mNextSibling, mPreviousSibling, mFirstChild: because they're
+  //   non-owning
+  return n;
+}
+
+size_t
+nsGenericElement::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
+{
+  return Element::SizeOfExcludingThis(aMallocSizeOf) +
+         mAttrsAndChildren.SizeOfExcludingThis(aMallocSizeOf);
 }
 
 #define EVENT(name_, id_, type_, struct_)                                    \
   NS_IMETHODIMP nsINode::GetOn##name_(JSContext *cx, jsval *vp) {            \
     nsEventListenerManager *elm = GetListenerManager(false);              \
     if (elm) {                                                               \
       elm->GetJSEventListener(nsGkAtoms::on##name_, vp);                     \
     } else {                                                                 \
--- a/content/base/src/nsGenericElement.h
+++ b/content/base/src/nsGenericElement.h
@@ -242,17 +242,17 @@ public:
   nsGenericElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual ~nsGenericElement();
 
   friend class nsTouchEventReceiverTearoff;
   friend class nsInlineEventHandlersTearoff;
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
-  NS_DECL_DOM_MEMORY_REPORTER_SIZEOF
+  NS_DECL_SIZEOF_EXCLUDING_THIS
 
   /**
    * Called during QueryInterface to give the binding manager a chance to
    * get an interface for this element.
    */
   nsresult PostQueryInterface(REFNSIID aIID, void** aInstancePtr);
 
   // nsINode interface methods
--- a/content/base/src/nsLineBreaker.cpp
+++ b/content/base/src/nsLineBreaker.cpp
@@ -60,17 +60,17 @@ static void
 SetupCapitalization(const PRUnichar* aWord, PRUint32 aLength,
                     bool* aCapitalization)
 {
   // Capitalize the first non-punctuation character after a space or start
   // of the word.
   // The only space character a word can contain is NBSP.
   bool capitalizeNextChar = true;
   for (PRUint32 i = 0; i < aLength; ++i) {
-    if (capitalizeNextChar && !nsContentUtils::IsPunctuationMark(aWord[i])) {
+    if (capitalizeNextChar && !nsContentUtils::IsFirstLetterPunctuation(aWord[i])) {
       aCapitalization[i] = true;
       capitalizeNextChar = false;
     }
     if (aWord[i] == 0xA0 /*NBSP*/) {
       capitalizeNextChar = true;
     }
   }
 }
--- a/content/base/src/nsMappedAttributeElement.h
+++ b/content/base/src/nsMappedAttributeElement.h
@@ -61,19 +61,16 @@ class nsMappedAttributeElement : public 
 
 protected:
 
   nsMappedAttributeElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsMappedAttributeElementBase(aNodeInfo)
   {}
 
 public:
-  NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsMappedAttributeElement,
-                                              nsMappedAttributeElementBase)
-
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
                               bool aCompileEventHandlers);
 
   virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
 
   static void MapNoAttributesInto(const nsMappedAttributes* aAttributes, 
                                   nsRuleData* aRuleData);
--- a/content/base/src/nsMappedAttributes.cpp
+++ b/content/base/src/nsMappedAttributes.cpp
@@ -273,23 +273,21 @@ nsMappedAttributes::IndexOfAttr(nsIAtom*
         return i;
       }
     }
   }
 
   return -1;
 }
 
-PRInt64
-nsMappedAttributes::SizeOf() const
+size_t
+nsMappedAttributes::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
 {
   NS_ASSERTION(mAttrCount == mBufferSize,
                "mBufferSize and mAttrCount are expected to be the same.");
 
-  PRInt64 size = sizeof(*this) - sizeof(void*) + mAttrCount * sizeof(InternalAttr);
-
+  size_t n = aMallocSizeOf(this);
   for (PRUint16 i = 0; i < mAttrCount; ++i) {
-    size += Attrs()[i].mValue.SizeOf() - sizeof(Attrs()[i].mValue);
+    n += Attrs()[i].mValue.SizeOfExcludingThis(aMallocSizeOf);
   }
-
-  return size;
+  return n;
 }
 
--- a/content/base/src/nsMappedAttributes.h
+++ b/content/base/src/nsMappedAttributes.h
@@ -103,17 +103,17 @@ public:
   
 
   // nsIStyleRule 
   virtual void MapRuleInfoInto(nsRuleData* aRuleData);
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
-  PRInt64 SizeOf() const;
+  size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
 
 private:
   nsMappedAttributes(const nsMappedAttributes& aCopy);
   ~nsMappedAttributes();
 
   struct InternalAttr
   {
     nsAttrName mName;
--- a/content/base/src/nsStyledElement.h
+++ b/content/base/src/nsStyledElement.h
@@ -63,20 +63,16 @@ class nsStyledElementNotElementCSSInline
 
 protected:
 
   inline nsStyledElementNotElementCSSInlineStyle(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsStyledElementBase(aNodeInfo)
   {}
 
 public:
-
-  NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsStyledElementNotElementCSSInlineStyle,
-                                              nsStyledElementBase)
-
   // nsIContent interface methods
   virtual nsIAtom* GetClassAttributeName() const;
   virtual nsIAtom* GetIDAttributeName() const;
   virtual nsIAtom* DoGetID() const;
   virtual const nsAttrValue* DoGetClasses() const;
 
   virtual mozilla::css::StyleRule* GetInlineStyleRule();
   NS_IMETHOD SetInlineStyleRule(mozilla::css::StyleRule* aStyleRule, bool aNotify);
@@ -114,19 +110,15 @@ protected:
    * first put into a document.  Only has an effect if the old value is a
    * string.  If aForceInDataDoc is true, will reparse even if we're in a data
    * document.
    */
   nsresult  ReparseStyleAttribute(bool aForceInDataDoc);
 };
 
 class nsStyledElement : public nsStyledElementNotElementCSSInlineStyle {
-public:
-  NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsStyledElement,
-                                              nsStyledElementNotElementCSSInlineStyle)
-
 protected:
   inline nsStyledElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsStyledElementNotElementCSSInlineStyle(aNodeInfo)
   {}
 };
 
 #endif // __NS_STYLEDELEMENT_H_
--- a/content/base/src/nsTextFragment.cpp
+++ b/content/base/src/nsTextFragment.cpp
@@ -424,16 +424,30 @@ nsTextFragment::Append(const PRUnichar* 
   LossyConvertEncoding16to8 converter(buff + mState.mLength);
   copy_string(aBuffer, aBuffer + aLength, converter);
 
   m1b = buff;
   mState.mLength += aLength;
 
 }
 
+/* virtual */ size_t
+nsTextFragment::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
+{
+  if (Is2b()) {
+    return aMallocSizeOf(m2b);
+  }
+
+  if (mState.mInHeap) {
+    return aMallocSizeOf(m1b);
+  }
+
+  return 0;
+}
+
 // To save time we only do this when we really want to know, not during
 // every allocation
 void
 nsTextFragment::UpdateBidiFlag(const PRUnichar* aBuffer, PRUint32 aLength)
 {
   if (mState.mIs2b && !mState.mIsBidi) {
     const PRUnichar* cp = aBuffer;
     const PRUnichar* end = cp + aLength;
--- a/content/base/src/nsTextFragment.h
+++ b/content/base/src/nsTextFragment.h
@@ -218,26 +218,17 @@ public:
     // which causes crashes because we assume this structure is no more than
     // 32 bits!
     PRUint32 mInHeap : 1;
     PRUint32 mIs2b : 1;
     PRUint32 mIsBidi : 1;
     PRUint32 mLength : 29;
   };
 
-  /**
-   * Returns the size taken in memory by this text fragment.
-   * @return the size taken in memory by this text fragment.
-   */
-  PRInt64 SizeOf() const
-  {
-    PRInt64 size = sizeof(*this);
-    size += GetLength() * (Is2b() ? sizeof(*m2b) : sizeof(*m1b));
-    return size;
-  }
+  size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
 
 private:
   void ReleaseText();
 
   /**
    * Scan the contents of the fragment and turn on mState.mIsBidi if it
    * includes any Bidi characters.
    */
--- a/content/base/src/nsTextNode.h
+++ b/content/base/src/nsTextNode.h
@@ -64,19 +64,16 @@ public:
   NS_FORWARD_NSIDOMNODE(nsGenericDOMDataNode::)
 
   // nsIDOMCharacterData
   NS_FORWARD_NSIDOMCHARACTERDATA(nsGenericDOMDataNode::)
 
   // nsIDOMText
   NS_FORWARD_NSIDOMTEXT(nsGenericDOMDataNode::)
 
-  // DOM Memory Reporter participant.
-  NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsTextNode, nsGenericDOMDataNode)
-
   // nsINode
   virtual bool IsNodeOfType(PRUint32 aFlags) const;
 
   virtual nsGenericDOMDataNode* CloneDataNode(nsINodeInfo *aNodeInfo,
                                               bool aCloneText) const;
 
   nsresult BindToAttribute(nsIAttribute* aAttr);
   nsresult UnbindFromAttribute();
--- a/content/events/src/nsEventListenerManager.cpp
+++ b/content/events/src/nsEventListenerManager.cpp
@@ -999,30 +999,30 @@ nsEventListenerManager::GetJSEventListen
     
   if (ls->mHandlerIsString) {
     CompileEventHandlerInternal(ls, true, nsnull);
   }
 
   *vp = OBJECT_TO_JSVAL(listener->GetHandler());
 }
 
-PRInt64
-nsEventListenerManager::SizeOf() const
+size_t
+nsEventListenerManager::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf)
+  const
 {
-  PRInt64 size = sizeof(*this);
+  size_t n = aMallocSizeOf(this);
+  n += mListeners.SizeOfExcludingThis(aMallocSizeOf);
   PRUint32 count = mListeners.Length();
   for (PRUint32 i = 0; i < count; ++i) {
-    const nsListenerStruct& ls = mListeners.ElementAt(i);
-    size += sizeof(ls);
-    nsIJSEventListener* jsl = ls.GetJSListener();
+    nsIJSEventListener* jsl = mListeners.ElementAt(i).GetJSListener();
     if (jsl) {
-      size += jsl->SizeOf();
+      n += jsl->SizeOfIncludingThis(aMallocSizeOf);
     }
   }
-  return size;
+  return n;
 }
 
 void
 nsEventListenerManager::UnmarkGrayJSListeners()
 {
   PRUint32 count = mListeners.Length();
   for (PRUint32 i = 0; i < count; ++i) {
     const nsListenerStruct& ls = mListeners.ElementAt(i);
--- a/content/events/src/nsEventListenerManager.h
+++ b/content/events/src/nsEventListenerManager.h
@@ -238,17 +238,17 @@ public:
   /**
    * Returns true if there may be a touch event listener registered,
    * false if there definitely isn't.
    */
   bool MayHaveTouchEventListener() { return mMayHaveTouchEventListener; }
 
   bool MayHaveMouseEnterLeaveEventListener() { return mMayHaveMouseEnterLeaveEventListener; }
 
-  PRInt64 SizeOf() const;
+  size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
 
   void UnmarkGrayJSListeners();
 
   nsISupports* GetTarget() { return mTarget; }
 protected:
   nsresult HandleEventSubType(nsListenerStruct* aListenerStruct,
                               nsIDOMEventListener* aListener,
                               nsIDOMEvent* aDOMEvent,
--- a/content/html/content/src/nsFormSubmission.cpp
+++ b/content/html/content/src/nsFormSubmission.cpp
@@ -713,25 +713,18 @@ nsEncodingFormSubmission::nsEncodingForm
 {
   nsCAutoString charset(aCharset);
   // canonical name is passed so that we just have to check against
   // *our* canonical names listed in charsetaliases.properties
   if (charset.EqualsLiteral("ISO-8859-1")) {
     charset.AssignLiteral("windows-1252");
   }
 
-  // use UTF-8 for UTF-16* (per WHATWG and existing practice of
-  // MS IE/Opera). 
-  if (StringBeginsWith(charset, NS_LITERAL_CSTRING("UTF-16"))) {
-    charset.AssignLiteral("UTF-8");
-  }
-
   if (!(charset.EqualsLiteral("UTF-8") || charset.EqualsLiteral("gb18030"))) {
-    nsAutoString charsetUtf16;
-    CopyUTF8toUTF16(charset, charsetUtf16);
+    NS_ConvertUTF8toUTF16 charsetUtf16(charset);
     const PRUnichar* charsetPtr = charsetUtf16.get();
     SendJSWarning(aOriginatingElement ? aOriginatingElement->GetOwnerDocument()
                                       : nsnull,
                   "CannotEncodeAllUnicode",
                   &charsetPtr,
                   1);
   }
 
@@ -864,16 +857,25 @@ GetSubmissionFromForm(nsGenericHTMLEleme
   } else {
     GetEnumAttr(aForm, nsGkAtoms::method, &method);
   }
 
   // Get charset
   nsCAutoString charset;
   GetSubmitCharset(aForm, charset);
 
+  // We now have a canonical charset name, so we only have to check it
+  // against canonical names.
+
+  // use UTF-8 for UTF-16* (per WHATWG and existing practice of
+  // MS IE/Opera).
+  if (StringBeginsWith(charset, NS_LITERAL_CSTRING("UTF-16"))) {
+    charset.AssignLiteral("UTF-8");
+  }
+
   // Choose encoder
   if (method == NS_FORM_METHOD_POST &&
       enctype == NS_FORM_ENCTYPE_MULTIPART) {
     *aFormSubmission = new nsFSMultipartFormData(charset, aOriginatingElement);
   } else if (method == NS_FORM_METHOD_POST &&
              enctype == NS_FORM_ENCTYPE_TEXTPLAIN) {
     *aFormSubmission = new nsFSTextPlain(charset, aOriginatingElement);
   } else {
--- a/content/html/content/src/nsGenericHTMLElement.h
+++ b/content/html/content/src/nsGenericHTMLElement.h
@@ -77,19 +77,16 @@ class nsGenericHTMLElement : public nsGe
 public:
   nsGenericHTMLElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElementBase(aNodeInfo)
   {
     NS_ASSERTION(mNodeInfo->NamespaceID() == kNameSpaceID_XHTML,
                  "Unexpected namespace");
   }
 
-  NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsGenericHTMLElement,
-                                              nsGenericHTMLElementBase)
-
   /** Typesafe, non-refcounting cast from nsIContent.  Cheaper than QI. **/
   static nsGenericHTMLElement* FromContent(nsIContent *aContent)
   {
     if (aContent->IsHTML())
       return static_cast<nsGenericHTMLElement*>(aContent);
     return nsnull;
   }
 
@@ -869,19 +866,16 @@ class nsHTMLFieldSetElement;
  */
 class nsGenericHTMLFormElement : public nsGenericHTMLElement,
                                  public nsIFormControl
 {
 public:
   nsGenericHTMLFormElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual ~nsGenericHTMLFormElement();
 
-  NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsGenericHTMLFormElement,
-                                              nsGenericHTMLElement)
-
   NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
 
   virtual bool IsNodeOfType(PRUint32 aFlags) const;
   virtual void SaveSubtreeState();
 
   // nsIFormControl
   virtual mozilla::dom::Element* GetFormElement();
   virtual void SetForm(nsIDOMHTMLFormElement* aForm);
--- a/content/html/content/src/nsGenericHTMLFrameElement.cpp
+++ b/content/html/content/src/nsGenericHTMLFrameElement.cpp
@@ -264,26 +264,16 @@ nsGenericHTMLFrameElement::IsHTMLFocusab
 
   if (!*aIsFocusable && aTabIndex) {
     *aTabIndex = -1;
   }
 
   return false;
 }
 
-PRInt64
-nsGenericHTMLFrameElement::SizeOf() const
-{
-  PRInt64 size = MemoryReporter::GetBasicSize<nsGenericHTMLFrameElement,
-                                              nsGenericHTMLElement>(this);
-  // TODO: need to implement SizeOf() in nsFrameLoader, bug 672539.
-  size += mFrameLoader ? sizeof(*mFrameLoader.get()) : 0;
-  return size;
-}
-
 NS_IMETHODIMP
 nsGenericHTMLFrameElement::GetMozbrowser(bool *aValue)
 {
   return GetBoolAttr(nsGkAtoms::mozbrowser, aValue);
 }
 
 NS_IMETHODIMP
 nsGenericHTMLFrameElement::SetMozbrowser(bool aValue)
--- a/content/html/content/src/nsGenericHTMLFrameElement.h
+++ b/content/html/content/src/nsGenericHTMLFrameElement.h
@@ -29,17 +29,16 @@ public:
   }
 
   virtual ~nsGenericHTMLFrameElement();
 
   NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
   NS_DECL_NSIFRAMELOADEROWNER
   NS_DECL_NSIDOMMOZBROWSERFRAME
   NS_DECL_NSIWEBPROGRESSLISTENER
-  NS_DECL_DOM_MEMORY_REPORTER_SIZEOF
 
   // nsIContent
   virtual bool IsHTMLFocusable(bool aWithMouse, bool *aIsFocusable, PRInt32 *aTabIndex);
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
                               bool aCompileEventHandlers);
   virtual void UnbindFromTree(bool aDeep = true,
                               bool aNullParent = true);
--- a/content/html/content/src/nsHTMLAnchorElement.cpp
+++ b/content/html/content/src/nsHTMLAnchorElement.cpp
@@ -92,20 +92,18 @@ public:
   }
   NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
     return nsGenericHTMLElement::SetInnerHTML(aInnerHTML);
   }
 
   // nsIDOMHTMLAnchorElement
   NS_DECL_NSIDOMHTMLANCHORELEMENT  
 
-  // TODO: we do not really count Link::mCachedURI but given that it's a
-  // nsCOMPtr<nsIURI>, that would be required adding SizeOf() to the interface.
-  NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsHTMLAnchorElement,
-                                              nsGenericHTMLElement)
+  // TODO: nsHTMLAnchorElement::SizeOfAnchorElement should call
+  // Link::SizeOfExcludingThis().  See bug 682431.
 
   // nsILink
   NS_IMETHOD LinkAdded() { return NS_OK; }
   NS_IMETHOD LinkRemoved() { return NS_OK; }
 
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
                               bool aCompileEventHandlers);
--- a/content/html/content/src/nsHTMLAreaElement.cpp
+++ b/content/html/content/src/nsHTMLAreaElement.cpp
@@ -56,16 +56,19 @@ class nsHTMLAreaElement : public nsGener
 {
 public:
   nsHTMLAreaElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual ~nsHTMLAreaElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
+  // TODO: nsHTMLAreaElement::SizeOfAnchorElement should call
+  // Link::SizeOfExcludingThis().  See bug 682431.
+
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE(nsGenericHTMLElement::)
 
   // nsIDOMElement
   NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLElement::)
 
   // nsIDOMHTMLElement
   NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLElement::)
--- a/content/html/content/src/nsHTMLDivElement.cpp
+++ b/content/html/content/src/nsHTMLDivElement.cpp
@@ -64,19 +64,16 @@ public:
   NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLElement::)
 
   // nsIDOMHTMLElement
   NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLElement::)
 
   // nsIDOMHTMLDivElement
   NS_DECL_NSIDOMHTMLDIVELEMENT
 
-  NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsHTMLDivElement,
-                                              nsGenericHTMLElement)
-
   virtual bool ParseAttribute(PRInt32 aNamespaceID,
                                 nsIAtom* aAttribute,
                                 const nsAString& aValue,
                                 nsAttrValue& aResult);
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
   virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
--- a/content/html/content/src/nsHTMLLinkElement.cpp
+++ b/content/html/content/src/nsHTMLLinkElement.cpp
@@ -79,16 +79,19 @@ public:
   NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLElement::)
 
   // nsIDOMHTMLElement
   NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLElement::)
 
   // nsIDOMHTMLLinkElement
   NS_DECL_NSIDOMHTMLLINKELEMENT
 
+  // TODO: nsHTMLLinkElement::SizeOfAnchorElement should call
+  // Link::SizeOfExcludingThis().  See bug 682431.
+
   // nsILink
   NS_IMETHOD    LinkAdded();
   NS_IMETHOD    LinkRemoved();
 
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
                               bool aCompileEventHandlers);
   virtual void UnbindFromTree(bool aDeep = true,
--- a/content/html/content/src/nsHTMLSpanElement.cpp
+++ b/content/html/content/src/nsHTMLSpanElement.cpp
@@ -57,19 +57,16 @@ public:
   NS_FORWARD_NSIDOMNODE(nsGenericHTMLElement::)
 
   // nsIDOMElement
   NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLElement::)
 
   // nsIDOMHTMLElement
   NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLElement::)
 
-  NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsHTMLSpanElement,
-                                              nsGenericHTMLElement)
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   virtual nsXPCClassInfo* GetClassInfo();
 };
 
 
 NS_IMPL_NS_NEW_HTML_ELEMENT(Span)
 
--- a/content/html/content/test/Makefile.in
+++ b/content/html/content/test/Makefile.in
@@ -267,16 +267,17 @@ include $(topsrcdir)/config/rules.mk
 		test_bug660663.html \
 		test_bug664299.html \
 		test_bug666200.html \
 		test_bug666666.html \
 		test_bug669012.html \
 		test_bug674558.html \
 		test_bug583533.html \
 		test_restore_from_parser_fragment.html \
+		test_bug615595.html \
 		test_bug617528.html \
 		test_bug660959-1.html \
 		test_bug660959-2.html \
 		test_bug660959-3.html \
 		test_checked.html \
 		test_bug677658.html \
 		test_bug677463.html \
 		test_bug682886.html \
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..3acaad9e0c25cbb16dd60fcbe6facf1c4aa8ef1f
GIT binary patch
literal 2692
zc$~df+iuf95S{0I#nu9vqGGE;AZQaRpsjdlMWq%Yo~o_w5JTcvvC~peznMP(&dl!G
z>%^r6A+)kHdzmw5XU~rF<0lPhjrQm*y{1$8K*zLCir&CJqC<K?J<N}(qA5*mZ;c+I
z^<=c7f=b$^2<@B}^pU<&hLsc26vAiL>d$D76%jnfurKM%`h*nYozX6ygogB#w&)4k
zb38qX=6IyQNu;OH28fV?gN7YrRs+A3ks$>@u4n|`XRsTO3Nb41NilYccZr_DI_9S6
zmGDt51_Lnmy&O`Bm~)I5f>6;FtW+XvSOr#RSfRytMmbPEp?87D_YB}$q8E!NM>3pB
z*e6&s6{NK0+C3TqyM({tw%k^8^A4T|b#4Z7CJm=%kGzMRKHrL=Fq2|6kC&2*i7?|6
zOYJWG4Dl|%$Zle+>SjI`%+a0mQq{R|n32^@)Kbm>s++;SvOO)_v}n`qjg`ro<-G?>
zT>g*l`CN`#I5(?P+np4cGe`m68R8Y<dF9;zbFN13Q`qJPjU^*PTDLh^@5qVY54=bt
z>1pi6DV;}iSSR4ix;e%y`-OESY4b6hSZRgaT3;*cwN{u@4y36aPvmZC8RuIyfv=g-
z^c@zDM}H7!EIUfj%U5EZE$RQP1D#L8<+VMYVSH}UeB7IJTGjW`_jPJ6ti@-1;d#Z9
z{YrM=DvP^|tD4vrF6@zd=V2lkWT&dR@NT%7dluOFe^mz=t%uo%XzGr&S;^{1JiF`S
zCE{@HJ`j|BD9JH0qpXHZZf2i0Xh)E==-?0@Z0&=q$!H&37O)znvyY;0Hg}BEhsO*n
z7II>_tw%;X=8mMWPUOTl;nUR7E$l3?92o5$u#6Hmq=w|+Z5SzJSKY#;;ZupSOX1<`
z<Gt)Xk%|-wwtq^SD;4?jx9h{YMuzfhR2IYPdzx{T&p$)IDy&BR`*vFm+N~?d5YK)5
z|9On}OPobY4?1rAu=T~;=-?V48duT<&=dJ;Xwi<6%+Dn+v1r;wR`QKWX!-l9?6<-p
zom-TNsF{_O$X%P&b8T)r9=Gm$G3ro0ufCQW(CBYu^;d$+IdC$$2WI^>etVt&9!!;*
Odo`>5&5iv3l)nJYyQQW8
--- a/content/html/document/src/nsHTMLDocument.cpp
+++ b/content/html/document/src/nsHTMLDocument.cpp
@@ -3444,8 +3444,27 @@ nsHTMLDocument::IsEditingOnAfterFlush()
 }
 
 void
 nsHTMLDocument::RemovedFromDocShell()
 {
   mEditingState = eOff;
   nsDocument::RemovedFromDocShell();
 }
+
+/* virtual */ void
+nsHTMLDocument::DocSizeOfExcludingThis(nsWindowSizes* aWindowSizes) const
+{
+  nsDocument::DocSizeOfExcludingThis(aWindowSizes);
+
+  // Measurement of the following members may be added later if DMD finds it is
+  // worthwhile:
+  // - mImages
+  // - mApplets
+  // - mEmbeds
+  // - mLinks
+  // - mAnchors
+  // - mScripts
+  // - mForms
+  // - mFormControls
+  // - mWyciwygChannel
+  // - mMidasCommandManager
+}
--- a/content/html/document/src/nsHTMLDocument.h
+++ b/content/html/document/src/nsHTMLDocument.h
@@ -199,16 +199,20 @@ public:
   virtual NS_HIDDEN_(void) RemovedFromDocShell();
 
   virtual mozilla::dom::Element *GetElementById(const nsAString& aElementId)
   {
     return nsDocument::GetElementById(aElementId);
   }
 
   virtual nsXPCClassInfo* GetClassInfo();
+
+  virtual void DocSizeOfExcludingThis(nsWindowSizes* aWindowSizes) const;
+  // DocSizeOfIncludingThis is inherited from nsIDocument.
+
 protected:
   nsresult GetBodySize(PRInt32* aWidth,
                        PRInt32* aHeight);
 
   nsIContent *MatchId(nsIContent *aContent, const nsAString& aId);
 
   static bool MatchLinks(nsIContent *aContent, PRInt32 aNamespaceID,
                            nsIAtom* aAtom, void* aData);
--- a/content/xml/content/src/nsXMLCDATASection.cpp
+++ b/content/xml/content/src/nsXMLCDATASection.cpp
@@ -57,20 +57,16 @@ public:
   NS_FORWARD_NSIDOMNODE(nsGenericDOMDataNode::)
 
   // nsIDOMCharacterData
   NS_FORWARD_NSIDOMCHARACTERDATA(nsGenericDOMDataNode::)
 
   // nsIDOMText
   NS_FORWARD_NSIDOMTEXT(nsGenericDOMDataNode::)
 
-  // DOM Memory Reporter participant.
-  NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsXMLCDATASection,
-                                              nsGenericDOMDataNode)
-
   // nsIDOMCDATASection
   // Empty interface
 
   // nsINode
   virtual bool IsNodeOfType(PRUint32 aFlags) const;
 
   virtual nsGenericDOMDataNode* CloneDataNode(nsINodeInfo *aNodeInfo,
                                               bool aCloneText) const;
--- a/content/xml/content/src/nsXMLProcessingInstruction.h
+++ b/content/xml/content/src/nsXMLProcessingInstruction.h
@@ -60,20 +60,16 @@ public:
   NS_FORWARD_NSIDOMNODE(nsGenericDOMDataNode::)
 
   // nsIDOMCharacterData
   NS_FORWARD_NSIDOMCHARACTERDATA(nsGenericDOMDataNode::)
 
   // nsIDOMProcessingInstruction
   NS_DECL_NSIDOMPROCESSINGINSTRUCTION
 
-  // DOM Memory Reporter participant.
-  NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsXMLProcessingInstruction,
-                                              nsGenericDOMDataNode)
-
   // nsINode
   virtual bool IsNodeOfType(PRUint32 aFlags) const;
 
   virtual nsGenericDOMDataNode* CloneDataNode(nsINodeInfo *aNodeInfo,
                                               bool aCloneText) const;
 
 #ifdef DEBUG
   virtual void List(FILE* out, PRInt32 aIndent) const;
--- a/content/xml/document/src/nsXMLDocument.cpp
+++ b/content/xml/document/src/nsXMLDocument.cpp
@@ -590,16 +590,22 @@ nsXMLDocument::EndLoad()
     // document was loaded as pure data without any presentation
     // attached to it.
     nsEvent event(true, NS_LOAD);
     nsEventDispatcher::Dispatch(static_cast<nsIDocument*>(this), nsnull,
                                 &event);
   }    
 }
  
+/* virtual */ void
+nsXMLDocument::DocSizeOfExcludingThis(nsWindowSizes* aWindowSizes) const
+{
+  nsDocument::DocSizeOfExcludingThis(aWindowSizes);
+}
+
 // nsIDOMDocument interface
 
 nsresult
 nsXMLDocument::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
 {
   NS_ASSERTION(aNodeInfo->NodeInfoManager() == mNodeInfoManager,
                "Can't import this document into another document!");
 
--- a/content/xml/document/src/nsXMLDocument.h
+++ b/content/xml/document/src/nsXMLDocument.h
@@ -71,16 +71,20 @@ public:
   // nsIDOMXMLDocument
   NS_DECL_NSIDOMXMLDOCUMENT
 
   virtual nsresult Init();
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   virtual nsXPCClassInfo* GetClassInfo();
+
+  virtual void DocSizeOfExcludingThis(nsWindowSizes* aWindowSizes) const;
+  // DocSizeOfIncludingThis is inherited from nsIDocument.
+
 protected:
   // mChannelIsPending indicates whether we're currently asynchronously loading
   // data from mChannel (via document.load() or normal load).  It's set to true
   // when we first find out about the channel (StartDocumentLoad) and set to
   // false in EndLoad or if ResetToURI() is called.  In the latter case our
   // mChannel is also cancelled.  Note that if this member is true, mChannel
   // cannot be null.
   bool mChannelIsPending;
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1144,31 +1144,27 @@ Navigator::GetMozBluetooth(nsIDOMBluetoo
     bluetooth = mBluetooth;
   }
 
   bluetooth.forget(aBluetooth);
   return NS_OK;
 }
 #endif //MOZ_B2G_BT
 
-PRInt64
-Navigator::SizeOf() const
+size_t
+Navigator::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
 {
-  PRInt64 size = sizeof(*this);
+  size_t n = aMallocSizeOf(this);
 
-  // TODO: add SizeOf() to nsMimeTypeArray, bug 674113.
-  size += mMimeTypes ? sizeof(*mMimeTypes.get()) : 0;
-  // TODO: add SizeOf() to nsPluginArray, bug 674114.
-  size += mPlugins ? sizeof(*mPlugins.get()) : 0;
-  // TODO: add SizeOf() to nsGeolocation, bug 674115.
-  size += mGeolocation ? sizeof(*mGeolocation.get()) : 0;
-  // TODO: add SizeOf() to nsDesktopNotificationCenter, bug 674116.
-  size += mNotification ? sizeof(*mNotification.get()) : 0;
+  // TODO: add SizeOfIncludingThis() to nsMimeTypeArray, bug 674113.
+  // TODO: add SizeOfIncludingThis() to nsPluginArray, bug 674114.
+  // TODO: add SizeOfIncludingThis() to nsGeolocation, bug 674115.
+  // TODO: add SizeOfIncludingThis() to nsDesktopNotificationCenter, bug 674116.
 
-  return size;
+  return n;
 }
 
 void
 Navigator::SetWindow(nsPIDOMWindow *aInnerWindow)
 {
   NS_ASSERTION(aInnerWindow->IsInnerWindow(),
                "Navigator must get an inner window!");
   mWindow = do_GetWeakReference(aInnerWindow);
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
@@ -131,17 +131,17 @@ public:
 
   void Invalidate();
   nsPIDOMWindow *GetWindow();
 
   void RefreshMIMEArray();
 
   static bool HasDesktopNotificationSupport();
 
-  PRInt64 SizeOf() const;
+  size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
 
   /**
    * For use during document.write where our inner window changes.
    */
   void SetWindow(nsPIDOMWindow *aInnerWindow);
 
 private:
   bool IsSmsAllowed() const;
--- a/dom/base/nsDOMMemoryReporter.cpp
+++ b/dom/base/nsDOMMemoryReporter.cpp
@@ -90,18 +90,17 @@ AppendWindowURI(nsGlobalWindow *aWindow,
 
 struct WindowTotals
 {
   WindowTotals() : mDom(0), mStyleSheets(0) {}
   size_t mDom;
   size_t mStyleSheets;
 };
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(WindowStyleSheetsMallocSizeOf,
-                                     "window/style-sheets")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(DOMStyleMallocSizeOf, "dom+style")
 
 static void
 CollectWindowReports(nsGlobalWindow *aWindow,
                      WindowTotals *aWindowTotals,
                      nsIMemoryMultiReporterCallback *aCb,
                      nsISupports *aClosure)
 {
   // DOM window objects fall into one of three categories:
@@ -151,18 +150,18 @@ CollectWindowReports(nsGlobalWindow *aWi
   // Which gives us simple counts of how many outer windows (and their
   // combined sizes) per category.
 
   nsCAutoString windowPath("explicit/dom+style/window-objects/");
 
   nsIDocShell *docShell = aWindow->GetDocShell();
 
   nsGlobalWindow *top = aWindow->GetTop();
-  PRInt64 windowDOMSize = aWindow->SizeOf();
-  PRInt64 styleSheetsSize = aWindow->SizeOfStyleSheets(WindowStyleSheetsMallocSizeOf);
+  nsWindowSizes windowSizes(DOMStyleMallocSizeOf);
+  aWindow->SizeOfIncludingThis(&windowSizes);
 
   if (docShell && aWindow->IsFrozen()) {
     windowPath += NS_LITERAL_CSTRING("cached/");
   } else if (docShell) {
     windowPath += NS_LITERAL_CSTRING("active/");
   } else {
     windowPath += NS_LITERAL_CSTRING("other/");
   }
@@ -195,37 +194,37 @@ CollectWindowReports(nsGlobalWindow *aWi
   } else {
     // Combine all outer windows per section (active/cached/other) as
     // they basically never contain anything of interest, and are
     // always pretty much the same size.
 
     windowPath += NS_LITERAL_CSTRING("outer-windows");
   }
 
-  if (windowDOMSize > 0) {
+  if (windowSizes.mDOM > 0) {
     nsCAutoString domPath(windowPath);
     domPath += "/dom";
     NS_NAMED_LITERAL_CSTRING(kWindowDesc,
                              "Memory used by a window and the DOM within it.");
     aCb->Callback(EmptyCString(), domPath, nsIMemoryReporter::KIND_HEAP,
-                  nsIMemoryReporter::UNITS_BYTES, windowDOMSize, kWindowDesc,
-                  aClosure);
-    aWindowTotals->mDom += windowDOMSize;
+                  nsIMemoryReporter::UNITS_BYTES, windowSizes.mDOM,
+                  kWindowDesc, aClosure);
+    aWindowTotals->mDom += windowSizes.mDOM;
   }
 
-  if (styleSheetsSize > 0) {
+  if (windowSizes.mStyleSheets > 0) {
     nsCAutoString styleSheetsPath(windowPath);
     styleSheetsPath += "/style-sheets";
     NS_NAMED_LITERAL_CSTRING(kStyleSheetsDesc,
                              "Memory used by style sheets within a window.");
     aCb->Callback(EmptyCString(), styleSheetsPath,
                   nsIMemoryReporter::KIND_HEAP,
-                  nsIMemoryReporter::UNITS_BYTES, styleSheetsSize,
+                  nsIMemoryReporter::UNITS_BYTES, windowSizes.mStyleSheets,
                   kStyleSheetsDesc, aClosure);
-    aWindowTotals->mStyleSheets += styleSheetsSize;
+    aWindowTotals->mStyleSheets += windowSizes.mStyleSheets;
   }
 }
 
 typedef nsTArray< nsRefPtr<nsGlobalWindow> > WindowArray;
 
 static
 PLDHashOperator
 GetWindows(const PRUint64& aId, nsGlobalWindow*& aWindow, void* aClosure)
--- a/dom/base/nsDOMMemoryReporter.h
+++ b/dom/base/nsDOMMemoryReporter.h
@@ -35,50 +35,34 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef nsDOMMemoryReporter_h__
 #define nsDOMMemoryReporter_h__
 
 #include "nsIMemoryReporter.h"
 
+// This should be used for any nsINode sub-class that has fields of its own
+// that it needs to measure;  any sub-class that doesn't use it will inherit
+// SizeOfExcludingThis from its super-class.  SizeOfIncludingThis() need not be
+// defined, it is inherited from nsINode.
+#define NS_DECL_SIZEOF_EXCLUDING_THIS \
+  virtual size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
 
-/**
- * Helper methods for the DOM Memory Reporter.
- */
-namespace mozilla {
-  namespace dom {
-    namespace MemoryReporter {
-      /**
-       * It will compute the basic size of an object. This means the size of the
-       * object itself plus everything owned by its superclasses.  This will not
-       * include the size of objects owned by this objects (which have to be
-       * manually added to ::SizeOf), but does include the size of any pointers
-       * to those objects stored in this object.
-       */
-      template <class TypeCurrent, class TypeParent>
-      inline PRInt64 GetBasicSize(const TypeCurrent* const obj) {
-        return obj->TypeParent::SizeOf() - sizeof(TypeParent)
-                                         + sizeof(TypeCurrent);
-      }
-    }
-  }
-}
-
-/**
- * Helper macros to declare/implement SizeOf() method for DOM objects.
- */
-#define NS_DECL_DOM_MEMORY_REPORTER_SIZEOF  \
-  virtual PRInt64 SizeOf() const;
-
-#define NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(TypeCurrent, TypeParent) \
-  virtual PRInt64 SizeOf() const {                                           \
-    return mozilla::dom::MemoryReporter::GetBasicSize<TypeCurrent,           \
-                                                      TypeParent>(this);     \
-  }
+class nsWindowSizes {
+public:
+    nsWindowSizes(nsMallocSizeOfFun aMallocSizeOf)
+    : mMallocSizeOf(aMallocSizeOf),
+      mDOM(0),
+      mStyleSheets(0)
+    {}
+    nsMallocSizeOfFun mMallocSizeOf;
+    size_t mDOM;
+    size_t mStyleSheets;
+};
 
 class nsDOMMemoryMultiReporter: public nsIMemoryMultiReporter
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMEMORYMULTIREPORTER
 
   static void Init();
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -462,16 +462,23 @@ public:
   NS_IMETHOD GetURL(const char *aURL, const char *aTarget,
                     nsIInputStream *aPostStream,
                     void *aHeadersData, PRUint32 aHeadersDataLen);
   NS_IMETHOD ShowStatus(const PRUnichar *aStatusMsg);
   NPError ShowNativeContextMenu(NPMenu* menu, void* event);
   NPBool ConvertPoint(double sourceX, double sourceY, NPCoordinateSpace sourceSpace,
                       double *destX, double *destY, NPCoordinateSpace destSpace);
   void SendIdleEvent();
+  
+  NPError InitAsyncSurface(NPSize *size, NPImageFormat format,
+                           void *initData, NPAsyncSurface *surface)
+  { return NPERR_GENERIC_ERROR; }
+
+  NPError FinalizeAsyncSurface(NPAsyncSurface *surface) { return NPERR_GENERIC_ERROR; }
+  void SetCurrentAsyncSurface(NPAsyncSurface *surface, NPRect *changed) { return; }
 
   NS_DECL_CYCLE_COLLECTION_CLASS(nsDummyJavaPluginOwner)
 
 private:
   nsRefPtr<nsNPAPIPluginInstance> mInstance;
   nsCOMPtr<nsIDocument> mDocument;
 };
 
@@ -601,16 +608,22 @@ nsDummyJavaPluginOwner::InvalidateRect(N
 
 NS_IMETHODIMP
 nsDummyJavaPluginOwner::InvalidateRegion(NPRegion invalidRegion)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
+nsDummyJavaPluginOwner::RedrawPlugin()
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
 nsDummyJavaPluginOwner::GetNetscapeWindow(void *value)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsDummyJavaPluginOwner::SetEventModel(PRInt32 eventModel)
 {
@@ -10179,45 +10192,36 @@ nsGlobalWindow::HasIndexedDBSupport()
 
 // static
 bool
 nsGlobalWindow::HasPerformanceSupport() 
 {
   return Preferences::GetBool("dom.enable_performance", false);
 }
 
-PRInt64
-nsGlobalWindow::SizeOf() const
-{
-  PRInt64 size = sizeof(*this);
+void
+nsGlobalWindow::SizeOfIncludingThis(nsWindowSizes* aWindowSizes) const
+{
+  aWindowSizes->mDOM += aWindowSizes->mMallocSizeOf(this);
 
   if (IsInnerWindow()) {
     nsEventListenerManager* elm =
       const_cast<nsGlobalWindow*>(this)->GetListenerManager(false);
     if (elm) {
-      size += elm->SizeOf();
+      aWindowSizes->mDOM +=
+        elm->SizeOfIncludingThis(aWindowSizes->mMallocSizeOf);
     }
     if (mDoc) {
-      size += mDoc->SizeOf();
-    }
-  }
-
-  size += mNavigator ? mNavigator->SizeOf() : 0;
-
-  return size;
-}
-
-size_t
-nsGlobalWindow::SizeOfStyleSheets(nsMallocSizeOfFun aMallocSizeOf) const
-{
-  size_t n = 0;
-  if (IsInnerWindow() && mDoc) {
-    n += mDoc->SizeOfStyleSheets(aMallocSizeOf);
-  }
-  return n;
+      mDoc->DocSizeOfIncludingThis(aWindowSizes);
+    }
+  }
+
+  aWindowSizes->mDOM +=
+    mNavigator ?
+      mNavigator->SizeOfIncludingThis(aWindowSizes->mMallocSizeOf) : 0;
 }
 
 // nsGlobalChromeWindow implementation
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsGlobalChromeWindow)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsGlobalChromeWindow,
                                                   nsGlobalWindow)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mBrowserDOMWindow)
--- a/dom/base/nsGlobalWindow.h
+++ b/dom/base/nsGlobalWindow.h
@@ -137,16 +137,18 @@ class nsRunnable;
 
 class nsDOMOfflineResourceList;
 class nsDOMMozURLProperty;
 
 #ifdef MOZ_DISABLE_DOMCRYPTO
 class nsIDOMCrypto;
 #endif
 
+class nsWindowSizes;
+
 namespace mozilla {
 namespace dom {
 class Navigator;
 } // namespace dom
 } // namespace mozilla
 
 extern nsresult
 NS_CreateJSTimeoutHandler(nsGlobalWindow *aWindow,
@@ -571,18 +573,17 @@ public:
   static bool HasIndexedDBSupport();
 
   static bool HasPerformanceSupport();
 
   static WindowByIdTable* GetWindowsTable() {
     return sWindowsById;
   }
 
-  PRInt64 SizeOf() const;
-  size_t SizeOfStyleSheets(nsMallocSizeOfFun aMallocSizeOf) const;
+  void SizeOfIncludingThis(nsWindowSizes* aWindowSizes) const;
 
   void UnmarkGrayTimers();
 private:
   // Enable updates for the accelerometer.
   void EnableDeviceMotionUpdates();
 
   // Disables updates for the accelerometer.
   void DisableDeviceMotionUpdates();
--- a/dom/base/nsIJSEventListener.h
+++ b/dom/base/nsIJSEventListener.h
@@ -94,17 +94,40 @@ public:
     return mHandler;
   }
 
   // Set a handler for this event listener.  Must not be called if
   // there is already a handler!  The handler must already be bound to
   // the right target.
   virtual void SetHandler(JSObject *aHandler) = 0;
 
-  virtual PRInt64 SizeOf() const = 0;
+  // Among the sub-classes that inherit (directly or indirectly) from nsINode,
+  // measurement of the following members may be added later if DMD finds it is
+  // worthwhile:
+  // - nsIJSEventListener: mEventName
+  //
+  virtual size_t SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
+  {
+    return 0;
+
+    // Measurement of the following members may be added later if DMD finds it
+    // is worthwhile:
+    // - mContext
+    // - mTarget
+    //
+    // The following members are not measured:
+    // - mScopeObject, mHandler: because they're measured by the JS memory
+    //   reporters
+  }
+
+  virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
+  {
+    return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
+  }
+
 protected:
   virtual ~nsIJSEventListener()
   {
     NS_ASSERTION(!mTarget, "Should have called Disconnect()!");
   }
   nsCOMPtr<nsIScriptContext> mContext;
   JSObject* mScopeObject;
   nsISupports* mTarget;
--- a/dom/contacts/Makefile.in
+++ b/dom/contacts/Makefile.in
@@ -6,35 +6,34 @@ DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH            = \
   $(srcdir)        \
   $(NULL)
 
 include $(DEPTH)/config/autoconf.mk
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
+ifeq ($(MOZ_BUILD_APP),b2g)
 VPATH += $(srcdir)/fallback
 endif
 
 MODULE         = dom
 LIBRARY_NAME   = jsdomcontacts_s
 LIBXUL_LIBRARY = 1
 
-EXTRA_COMPONENTS =              \
-  ContactManager.js             \
-  ContactManager.manifest       \
+EXTRA_COMPONENTS =        \
+  ContactManager.js       \
+  ContactManager.manifest \
   $(NULL)
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
-EXTRA_JS_MODULES = ContactService.jsm \
-                   $(NULL)
-
-EXTRA_JS_MODULES += ContactDB.jsm \
-                    $(NULL)
+ifeq ($(MOZ_BUILD_APP),b2g)
+EXTRA_JS_MODULES =   \
+  ContactService.jsm \
+  ContactDB.jsm      \
+  $(NULL)
 endif
 
 ifdef ENABLE_TESTS
 DIRS += tests
 endif
 
 # Add VPATH to LOCAL_INCLUDES so we are going to include the correct backend
 # subdirectory (and the ipc one).
--- a/dom/plugins/base/npapi.h
+++ b/dom/plugins/base/npapi.h
@@ -223,16 +223,43 @@ typedef struct _NPSize
   int32_t height;
 } NPSize;
 
 typedef enum {
   NPFocusNext = 0,
   NPFocusPrevious = 1
 } NPFocusDirection;
 
+/* These formats describe the format in the memory byte-order. This means if
+ * a 32-bit value of a pixel is viewed on a little-endian system the layout will
+ * be 0xAARRGGBB. The Alpha channel will be stored in the most significant
+ * bits. */
+typedef enum {
+  /* 32-bit per pixel 8-bit per channel - premultiplied alpha */
+  NPImageFormatBGRA32     = 0x1,
+  /* 32-bit per pixel 8-bit per channel - 1 unused channel */
+  NPImageFormatBGRX32     = 0x2 
+} NPImageFormat;
+ 
+typedef struct _NPAsyncSurface
+{
+  uint32_t version;
+  NPSize size;
+  NPImageFormat format;
+  union {
+    struct {
+      uint32_t stride;
+      void *data;
+    } bitmap;
+#if defined(XP_WIN)
+    HANDLE sharedHandle;
+#endif
+  };
+} NPAsyncSurface;
+
 /* Return values for NPP_HandleEvent */
 #define kNPEventNotHandled 0
 #define kNPEventHandled 1
 /* Exact meaning must be spec'd in event model. */
 #define kNPEventStartIME 2
 
 #if defined(XP_UNIX)
 /*
@@ -268,27 +295,36 @@ typedef struct
 typedef struct
 {
   int32_t type;
   FILE* fp;
 } NPPrintCallbackStruct;
 
 #endif /* XP_UNIX */
 
-#if defined(XP_MACOSX)
 typedef enum {
 #ifndef NP_NO_QUICKDRAW
   NPDrawingModelQuickDraw = 0,
 #endif
+#if defined(XP_MACOSX)
   NPDrawingModelCoreGraphics = 1,
   NPDrawingModelOpenGL = 2,
   NPDrawingModelCoreAnimation = 3,
-  NPDrawingModelInvalidatingCoreAnimation = 4
+  NPDrawingModelInvalidatingCoreAnimation = 4,
+#endif
+  NPDrawingModelSyncWin = 5,
+  NPDrawingModelSyncX = 6,
+  NPDrawingModelAsyncBitmapSurface = 7
+#if defined(XP_WIN)
+  , NPDrawingModelAsyncWindowsDXGISurface = 8,
+  NPDrawingModelAsyncWindowsDX9ExSurface = 9
+#endif
 } NPDrawingModel;
 
+#if defined(XP_MACOSX)
 typedef enum {
 #ifndef NP_NO_CARBON
   NPEventModelCarbon = 0,
 #endif
   NPEventModelCocoa = 1
 } NPEventModel;
 #endif
 
@@ -365,19 +401,19 @@ typedef enum {
 
   /* Checks to see if the plug-in would like the browser to load the "src" attribute. */
   NPPVpluginCancelSrcStream = 20,
 
   NPPVsupportsAdvancedKeyHandling = 21,
 
   NPPVpluginUsesDOMForCursorBool = 22
 
-#if defined(XP_MACOSX)
   /* Used for negotiating drawing models */
   , NPPVpluginDrawingModel = 1000
+#if defined(XP_MACOSX)
   /* Used for negotiating event models */
   , NPPVpluginEventModel = 1001
   /* In the NPDrawingModelCoreAnimation drawing model, the browser asks the plug-in for a Core Animation layer. */
   , NPPVpluginCoreAnimationLayer = 1003
 #endif
 
 #if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)
   , NPPVpluginWindowlessLocalBool = 2002
@@ -410,26 +446,35 @@ typedef enum {
   NPNVSupportsWindowless = 17,
 
   NPNVprivateModeBool = 18,
 
   NPNVsupportsAdvancedKeyHandling = 21,
 
   NPNVdocumentOrigin = 22
 
-#if defined(XP_MACOSX)
   /* Used for negotiating drawing models */
   , NPNVpluginDrawingModel = 1000
+#if defined(XP_MACOSX)
 #ifndef NP_NO_QUICKDRAW
   , NPNVsupportsQuickDrawBool = 2000
 #endif
   , NPNVsupportsCoreGraphicsBool = 2001
   , NPNVsupportsOpenGLBool = 2002
   , NPNVsupportsCoreAnimationBool = 2003
   , NPNVsupportsInvalidatingCoreAnimationBool = 2004
+#endif
+  , NPNVsupportsSyncDrawingBool = 2005
+  , NPNVsupportsAsyncBitmapSurfaceBool = 2006
+#if defined(XP_WIN)
+  , NPNVsupportsAsyncWindowsDXGISurfaceBool = 2007
+  , NPNVsupportsAsyncWindowsDX9ExSurfaceBool = 2008
+#endif
+
+#if defined(XP_MACOSX)
 #ifndef NP_NO_CARBON
   , NPNVsupportsCarbonBool = 3000 /* TRUE if the browser supports the Carbon event model */
 #endif
   , NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */
   , NPNVsupportsUpdatedCocoaTextInputBool = 3002 /* TRUE if the browser supports the updated
                                                     Cocoa text input specification. */
   , NPNVsupportsCompositingCoreAnimationPluginsBool = 74656 /* TRUE if the browser supports
                                                                CA model compositing */
@@ -815,16 +860,17 @@ void    NP_LOADDS NPP_URLNotify(NPP inst
                                 NPReason reason, void* notifyData);
 NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value);
 NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value);
 NPBool  NP_LOADDS NPP_GotFocus(NPP instance, NPFocusDirection direction);
 void    NP_LOADDS NPP_LostFocus(NPP instance);
 void    NP_LOADDS NPP_URLRedirectNotify(NPP instance, const char* url, int32_t status, void* notifyData);
 NPError NP_LOADDS NPP_ClearSiteData(const char* site, uint64_t flags, uint64_t maxAge);
 char**  NP_LOADDS NPP_GetSitesWithData(void);
+void    NP_LOADDS NPP_DidComposite(NPP instance);
 
 /* NPN_* functions are provided by the navigator and called by the plugin. */
 void        NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor,
                                   int* netscape_major, int* netscape_minor);
 NPError     NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url,
                                        const char* target, void* notifyData);
 NPError     NP_LOADDS NPN_GetURL(NPP instance, const char* url,
                                  const char* target);
@@ -877,16 +923,21 @@ NPError     NP_LOADDS NPN_GetAuthenticat
                                                 uint32_t *plen);
 uint32_t    NP_LOADDS NPN_ScheduleTimer(NPP instance, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID));
 void        NP_LOADDS NPN_UnscheduleTimer(NPP instance, uint32_t timerID);
 NPError     NP_LOADDS NPN_PopUpContextMenu(NPP instance, NPMenu* menu);
 NPBool      NP_LOADDS NPN_ConvertPoint(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace);
 NPBool      NP_LOADDS NPN_HandleEvent(NPP instance, void *event, NPBool handled);
 NPBool      NP_LOADDS NPN_UnfocusInstance(NPP instance, NPFocusDirection direction);
 void        NP_LOADDS NPN_URLRedirectResponse(NPP instance, void* notifyData, NPBool allow);
+NPError     NP_LOADDS NPN_InitAsyncSurface(NPP instance, NPSize *size,
+                                           NPImageFormat format, void *initData,
+                                           NPAsyncSurface *surface);
+NPError     NP_LOADDS NPN_FinalizeAsyncSurface(NPP instance, NPAsyncSurface *surface);
+void        NP_LOADDS NPN_SetCurrentAsyncSurface(NPP instance, NPAsyncSurface *surface, NPRect *changed);
 
 #ifdef __cplusplus
 }  /* end extern "C" */
 #endif
 
 #endif /* RC_INVOKED */
 #if defined(__OS2__)
 #pragma pack()
--- a/dom/plugins/base/npfunctions.h
+++ b/dom/plugins/base/npfunctions.h
@@ -67,16 +67,17 @@ typedef void         (* NP_LOADDS NPP_UR
    by the plugin on the way out. The browser is responsible for releasing. */
 typedef NPError      (* NP_LOADDS NPP_GetValueProcPtr)(NPP instance, NPPVariable variable, void *ret_value);
 typedef NPError      (* NP_LOADDS NPP_SetValueProcPtr)(NPP instance, NPNVariable variable, void *value);
 typedef NPBool       (* NP_LOADDS NPP_GotFocusPtr)(NPP instance, NPFocusDirection direction);
 typedef void         (* NP_LOADDS NPP_LostFocusPtr)(NPP instance);
 typedef void         (* NP_LOADDS NPP_URLRedirectNotifyPtr)(NPP instance, const char* url, int32_t status, void* notifyData);
 typedef NPError      (* NP_LOADDS NPP_ClearSiteDataPtr)(const char* site, uint64_t flags, uint64_t maxAge);
 typedef char**       (* NP_LOADDS NPP_GetSitesWithDataPtr)(void);
+typedef void         (* NP_LOADDS NPP_DidCompositePtr)(NPP instance);
 
 typedef NPError      (*NPN_GetValueProcPtr)(NPP instance, NPNVariable variable, void *ret_value);
 typedef NPError      (*NPN_SetValueProcPtr)(NPP instance, NPPVariable variable, void *value);
 typedef NPError      (*NPN_GetURLNotifyProcPtr)(NPP instance, const char* url, const char* window, void* notifyData);
 typedef NPError      (*NPN_PostURLNotifyProcPtr)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData);
 typedef NPError      (*NPN_GetURLProcPtr)(NPP instance, const char* url, const char* window);
 typedef NPError      (*NPN_PostURLProcPtr)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file);
 typedef NPError      (*NPN_RequestReadProcPtr)(NPStream* stream, NPByteRange* rangeList);
@@ -125,16 +126,19 @@ typedef NPError      (*NPN_SetValueForUR
 typedef NPError      (*NPN_GetAuthenticationInfoPtr)(NPP npp, const char *protocol, const char *host, int32_t port, const char *scheme, const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen);
 typedef uint32_t     (*NPN_ScheduleTimerPtr)(NPP instance, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID));
 typedef void         (*NPN_UnscheduleTimerPtr)(NPP instance, uint32_t timerID);
 typedef NPError      (*NPN_PopUpContextMenuPtr)(NPP instance, NPMenu* menu);
 typedef NPBool       (*NPN_ConvertPointPtr)(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace);
 typedef NPBool       (*NPN_HandleEventPtr)(NPP instance, void *event, NPBool handled);
 typedef NPBool       (*NPN_UnfocusInstancePtr)(NPP instance, NPFocusDirection direction);
 typedef void         (*NPN_URLRedirectResponsePtr)(NPP instance, void* notifyData, NPBool allow);
+typedef NPError      (*NPN_InitAsyncSurfacePtr)(NPP instance, NPSize *size, NPImageFormat format, void *initData, NPAsyncSurface *surface);
+typedef NPError      (*NPN_FinalizeAsyncSurfacePtr)(NPP instance, NPAsyncSurface *surface);
+typedef void         (*NPN_SetCurrentAsyncSurfacePtr)(NPP instance, NPAsyncSurface *surface, NPRect *changed);
 
 typedef struct _NPPluginFuncs {
   uint16_t size;
   uint16_t version;
   NPP_NewProcPtr newp;
   NPP_DestroyProcPtr destroy;
   NPP_SetWindowProcPtr setwindow;
   NPP_NewStreamProcPtr newstream;
@@ -148,16 +152,17 @@ typedef struct _NPPluginFuncs {
   void* javaClass;
   NPP_GetValueProcPtr getvalue;
   NPP_SetValueProcPtr setvalue;
   NPP_GotFocusPtr gotfocus;
   NPP_LostFocusPtr lostfocus;
   NPP_URLRedirectNotifyPtr urlredirectnotify;
   NPP_ClearSiteDataPtr clearsitedata;
   NPP_GetSitesWithDataPtr getsiteswithdata;
+  NPP_DidCompositePtr didComposite;
 } NPPluginFuncs;
 
 typedef struct _NPNetscapeFuncs {
   uint16_t size;
   uint16_t version;
   NPN_GetURLProcPtr geturl;
   NPN_PostURLProcPtr posturl;
   NPN_RequestReadProcPtr requestread;
@@ -208,16 +213,19 @@ typedef struct _NPNetscapeFuncs {
   NPN_GetAuthenticationInfoPtr getauthenticationinfo;
   NPN_ScheduleTimerPtr scheduletimer;
   NPN_UnscheduleTimerPtr unscheduletimer;
   NPN_PopUpContextMenuPtr popupcontextmenu;
   NPN_ConvertPointPtr convertpoint;
   NPN_HandleEventPtr handleevent;
   NPN_UnfocusInstancePtr unfocusinstance;
   NPN_URLRedirectResponsePtr urlredirectresponse;
+  NPN_InitAsyncSurfacePtr initasyncsurface;
+  NPN_FinalizeAsyncSurfacePtr finalizeasyncsurface;
+  NPN_SetCurrentAsyncSurfacePtr setcurrentasyncsurface;
 } NPNetscapeFuncs;
 
 #ifdef XP_MACOSX
 /*
  * Mac OS X version(s) of NP_GetMIMEDescription(const char *)
  * These can be called to retreive MIME information from the plugin dynamically
  *
  * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way
--- a/dom/plugins/base/nsIPluginInstanceOwner.idl
+++ b/dom/plugins/base/nsIPluginInstanceOwner.idl
@@ -114,27 +114,36 @@ interface nsIPluginInstanceOwner : nsISu
   void invalidateRect(in NPRectPtr aRect);
 
   /**
    * Invalidate the region
    */
   void invalidateRegion(in NPRegion aRegion);
 
   /**
+   * Have the plugin recomposited.
+   */
+  void redrawPlugin();
+
+  /**
    * Get NetscapeWindow, corresponds to NPNVnetscapeWindow
    */
   void getNetscapeWindow(in voidPtr aValue);
 
   /**
    * Show native context menu
    */
 %{C++
   virtual NPError ShowNativeContextMenu(NPMenu* menu, void* event) = 0;
   virtual NPBool  ConvertPoint(double sourceX, double sourceY, NPCoordinateSpace sourceSpace,
                                double *destX, double *destY, NPCoordinateSpace destSpace) = 0;
+  virtual NPError InitAsyncSurface(NPSize *size, NPImageFormat format,
+                                   void *initData, NPAsyncSurface *surface) = 0;
+  virtual NPError FinalizeAsyncSurface(NPAsyncSurface *surface) = 0;
+  virtual void SetCurrentAsyncSurface(NPAsyncSurface *surface, NPRect *changed) = 0;
 %}
 
   void setEventModel(in PRInt32 eventModel);
 
 %{C++
   virtual void SendIdleEvent() = 0;
 %}
 
--- a/dom/plugins/base/nsJSNPRuntime.cpp
+++ b/dom/plugins/base/nsJSNPRuntime.cpp
@@ -215,35 +215,34 @@ static JSClass sNPObjectMemberClass =
     JS_ResolveStub, NPObjectMember_Convert,
     NPObjectMember_Finalize, nsnull, NPObjectMember_Call,
     nsnull, nsnull, NPObjectMember_Trace
   };
 
 static void
 OnWrapperDestroyed();
 
-static JSBool
-DelayedReleaseGCCallback(JSContext* cx, JSGCStatus status)
+static void
+DelayedReleaseGCCallback(JSRuntime* rt, JSGCStatus status)
 {
   if (JSGC_END == status) {
     // Take ownership of sDelayedReleases and null it out now. The
     // _releaseobject call below can reenter GC and double-free these objects.
     nsAutoPtr<nsTArray<NPObject*> > delayedReleases(sDelayedReleases);
     sDelayedReleases = nsnull;
 
     if (delayedReleases) {
       for (PRUint32 i = 0; i < delayedReleases->Length(); ++i) {
         NPObject* obj = (*delayedReleases)[i];
         if (obj)
           _releaseobject(obj);
         OnWrapperDestroyed();
       }
     }
   }
-  return JS_TRUE;
 }
 
 static void
 OnWrapperCreated()
 {
   if (sWrapperCount++ == 0) {
     static const char rtsvc_id[] = "@mozilla.org/js/xpc/RuntimeService;1";
     nsCOMPtr<nsIJSRuntimeService> rtsvc(do_GetService(rtsvc_id));
--- a/dom/plugins/base/nsNPAPIPlugin.cpp
+++ b/dom/plugins/base/nsNPAPIPlugin.cpp
@@ -195,17 +195,20 @@ static NPNetscapeFuncs sBrowserFuncs = {
   _setvalueforurl,
   _getauthenticationinfo,
   _scheduletimer,
   _unscheduletimer,
   _popupcontextmenu,
   _convertpoint,
   NULL, // handleevent, unimplemented
   NULL, // unfocusinstance, unimplemented
-  _urlredirectresponse
+  _urlredirectresponse,
+  _initasyncsurface,
+  _finalizeasyncsurface,
+  _setcurrentasyncsurface
 };
 
 static Mutex *sPluginThreadAsyncCallLock = nsnull;
 static PRCList sPendingAsyncCalls = PR_INIT_STATIC_CLIST(&sPendingAsyncCalls);
 
 // POST/GET stream type
 enum eNPPStreamTypeInternal {
   eNPPStreamTypeInternal_Get,
@@ -2012,25 +2015,32 @@ NPError NP_CALLBACK
   switch(variable) {
 #if defined(XP_UNIX) && !defined(XP_MACOSX)
   case NPNVxDisplay : {
 #if defined(MOZ_X11)
     if (npp) {
       nsNPAPIPluginInstance *inst = (nsNPAPIPluginInstance *) npp->ndata;
       bool windowless = false;
       inst->IsWindowless(&windowless);
-      NPBool needXEmbed = false;
+      // The documentation on the types for many variables in NP(N|P)_GetValue