Merge mozilla-central and mozilla-inbound
authorEd Morley <bmo@edmorley.co.uk>
Tue, 22 Nov 2011 14:57:02 +0000
changeset 82276 6f998cc964be237a2fc77b19006a01227837b9c3
parent 82275 81048a4acdfdd994b31228441323692488405b75 (current diff)
parent 82251 ea30e13fc978a6929683e174d0ac97a8618d385e (diff)
child 82277 a9a0abc254809fcc147ee50b94f3561a5e70e14c
child 82279 26ce0ab56d32de84222d35644a9865a139c2fba9
child 83576 9543a1bb4ca6d4088872366f65d67497bf821fa1
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone11.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-central and mozilla-inbound
config/autoconf.mk.in
configure.in
mobile/xul/app/Makefile.in
mobile/xul/confvars.sh
toolkit/mozapps/update/nsUpdateService.js
toolkit/xre/Makefile.in
toolkit/xre/nsAndroidStartup.cpp
--- a/browser/devtools/highlighter/inspector.jsm
+++ b/browser/devtools/highlighter/inspector.jsm
@@ -21,16 +21,17 @@
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
  *   Rob Campbell <rcampbell@mozilla.com> (original author)
  *   Mihai Șucan <mihai.sucan@gmail.com>
  *   Julian Viereck <jviereck@mozilla.com>
  *   Paul Rouget <paul@mozilla.com>
  *   Kyle Simpson <ksimpson@mozilla.com>
+ *   Johan Charlez <johan.charlez@gmail.com>
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either the GNU General Public License Version 2 or later (the "GPL"), or
  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
@@ -1107,18 +1108,18 @@ InspectorUI.prototype = {
   {
     if (!this.inspecting) {
       return;
     }
 
     this.inspectToolbutton.checked = false;
     // Detach event listeners from content window and child windows to disable
     // highlighting. We still want to be notified if the user presses "ESCAPE"
-    // to unlock the node, so we don't remove the "keypress" event until
-    // the highlighter is removed.
+    // to close the inspector, or "RETURN" to unlock the node, so we don't 
+    // remove the "keypress" event until the highlighter is removed.
     this.highlighter.detachInspectListeners();
 
     this.inspecting = false;
     this.toolsDim(false);
     if (this.highlighter.node) {
       this.select(this.highlighter.node, true, true, !aPreventScroll);
     } else {
       this.select(null, true, true);
@@ -1181,17 +1182,18 @@ InspectorUI.prototype = {
 
     if (this.store.getValue(this.winID, "inspecting")) {
       this.startInspecting();
     }
 
     this.restoreToolState(this.winID);
 
     this.win.focus();
-    Services.obs.notifyObservers(null, INSPECTOR_NOTIFICATIONS.OPENED, null);
+    Services.obs.notifyObservers({wrappedJSObject: this},
+                                 INSPECTOR_NOTIFICATIONS.OPENED, null);
   },
 
   /**
    * Main callback handler for events.
    *
    * @param event
    *        The event to be handled.
    */
@@ -1243,18 +1245,22 @@ InspectorUI.prototype = {
 
         if (this.store.isEmpty()) {
           this.tabbrowser.tabContainer.removeEventListener("TabSelect", this,
                                                          false);
         }
         break;
       case "keypress":
         switch (event.keyCode) {
+          case this.chromeWin.KeyEvent.DOM_VK_ESCAPE:
+            this.closeInspectorUI(false);
+            event.preventDefault();
+            event.stopPropagation();
+            break;
           case this.chromeWin.KeyEvent.DOM_VK_RETURN:
-          case this.chromeWin.KeyEvent.DOM_VK_ESCAPE:
             this.toggleInspection();
             event.preventDefault();
             event.stopPropagation();
             break;
           case this.chromeWin.KeyEvent.DOM_VK_LEFT:
             let node;
             if (this.selection) {
               node = this.selection.parentNode;
--- a/browser/devtools/highlighter/test/browser_inspector_highlighter.js
+++ b/browser/devtools/highlighter/test/browser_inspector_highlighter.js
@@ -89,21 +89,24 @@ function setupHighlighterTests()
 {
   h1 = doc.querySelector("h1");
   ok(h1, "we have the header");
   Services.obs.addObserver(runSelectionTests,
     InspectorUI.INSPECTOR_NOTIFICATIONS.OPENED, false);
   InspectorUI.toggleInspectorUI();
 }
 
-function runSelectionTests()
+function runSelectionTests(subject)
 {
   Services.obs.removeObserver(runSelectionTests,
     InspectorUI.INSPECTOR_NOTIFICATIONS.OPENED, false);
 
+  is(subject.wrappedJSObject, InspectorUI,
+     "InspectorUI accessible in the observer");
+
   executeSoon(function() {
     Services.obs.addObserver(performTestComparisons,
       InspectorUI.INSPECTOR_NOTIFICATIONS.HIGHLIGHTING, false);
     EventUtils.synthesizeMouse(h1, 2, 2, {type: "mousemove"}, content);
   });
 }
 
 function performTestComparisons(evt)
--- a/browser/devtools/highlighter/test/browser_inspector_keybindings.js
+++ b/browser/devtools/highlighter/test/browser_inspector_keybindings.js
@@ -39,41 +39,44 @@ function test()
     });
   }
 
   function lockNode()
   {
     Services.obs.removeObserver(lockNode,
       InspectorUI.INSPECTOR_NOTIFICATIONS.HIGHLIGHTING);
 
-    EventUtils.synthesizeKey("VK_ESCAPE", { });
+    EventUtils.synthesizeKey("VK_RETURN", { });
 
     executeSoon(isTheNodeLocked);
   }
 
   function isTheNodeLocked()
   {
     is(InspectorUI.selection, node, "selection matches node");
     ok(!InspectorUI.inspecting, "the node is locked");
     unlockNode();
   }
 
   function unlockNode() {
-    EventUtils.synthesizeKey("VK_ESCAPE", { });
+    EventUtils.synthesizeKey("VK_RETURN", { });
 
     executeSoon(isTheNodeUnlocked);
   }
 
   function isTheNodeUnlocked()
   {
     ok(InspectorUI.inspecting, "the node is unlocked");
 
+    // Let's close the inspector
     Services.obs.addObserver(finishUp,
       InspectorUI.INSPECTOR_NOTIFICATIONS.CLOSED, false);
-    InspectorUI.closeInspectorUI();
+
+    EventUtils.synthesizeKey("VK_ESCAPE", {});
+    ok(true, "Inspector is closing successfuly");
   }
 
   function finishUp() {
     Services.obs.removeObserver(finishUp,
                                 InspectorUI.INSPECTOR_NOTIFICATIONS.CLOSED);
     doc = node = null;
     gBrowser.removeCurrentTab();
     finish();
--- a/browser/devtools/webconsole/HUDService.jsm
+++ b/browser/devtools/webconsole/HUDService.jsm
@@ -3757,18 +3757,18 @@ HeadsUpDisplay.prototype = {
         name: "PageJS",
         category: "js",
         severities: [
           { name: "ConsoleErrors", prefKey: "exception" },
           { name: "ConsoleWarnings", prefKey: "jswarn" }
         ]
       },
       {
-        name: "PageWebDeveloper",
-        category: "webdev",
+        name: "PageLogging",
+        category: "logging",
         severities: [
           { name: "ConsoleErrors", prefKey: "error" },
           { name: "ConsoleWarnings", prefKey: "warn" },
           { name: "ConsoleInfo", prefKey: "info" },
           { name: "ConsoleLog", prefKey: "log" }
         ]
       }
     ];
--- a/browser/devtools/webconsole/test/browser/browser_webconsole_bug_601667_filter_buttons.js
+++ b/browser/devtools/webconsole/test/browser/browser_webconsole_bug_601667_filter_buttons.js
@@ -16,17 +16,17 @@ function testFilterButtons() {
 
   let hud = HUDService.getHudByWindow(content);
   hudId = hud.hudId;
   hudBox = hud.HUDBox;
 
   testMenuFilterButton("net");
   testMenuFilterButton("css");
   testMenuFilterButton("js");
-  testMenuFilterButton("webdev");
+  testMenuFilterButton("logging");
 
   finishTest();
 }
 
 function testMenuFilterButton(aCategory) {
   let selector = ".webconsole-filter-button[category=\"" + aCategory + "\"]";
   let button = hudBox.querySelector(selector);
   ok(button, "we have the \"" + aCategory + "\" button");
--- a/browser/locales/en-US/chrome/browser/devtools/gcli.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/gcli.properties
@@ -15,17 +15,17 @@ canonDescNone=(No description)
 # of JavaScript like traditional developer tool command lines. This describes
 # the '{' command.
 cliEvalJavascript=Enter JavaScript directly
 
 # LOCALIZATION NOTE (fieldSelectionSelect): When a command has a parameter
 # that has a number of pre-defined options the user interface presents these
 # in a drop-down menu, where the first 'option' is an indicator that a
 # selection should be made. This string describes that first option.
-fieldSelectionSelect=Select a %S ...
+fieldSelectionSelect=Select a %S …
 
 # LOCALIZATION NOTE (fieldArrayAdd): When a command has a parameter that can
 # be repeated a number of times (e.g. like the 'cat a.txt b.txt' command) the
 # user interface presents buttons to add and remove arguments. This string is
 # used to add arguments.
 fieldArrayAdd=Add
 
 # LOCALIZATION NOTE (fieldArrayDel): When a command has a parameter that can
--- a/browser/locales/en-US/chrome/browser/devtools/inspector.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/inspector.properties
@@ -1,8 +1,17 @@
+# LOCALIZATION NOTE These strings are used inside the Inspector
+# which is available from the Web Developer sub-menu -> 'Inspect'.
+#
+# The correct localization of this file might be to keep it in
+# English, or another language commonly spoken among web developers.
+# You want to make that choice consistent across the developer tools.
+# A good criteria is the language in which you'd find the best
+# documentation on web development on the web.
+
 # LOCALIZATION NOTE (confirmNavigationAway): Used in the Inspector tool, when
 # the user tries to navigate away from a web page, to confirm the change of
 # page.
 confirmNavigationAway.message=Leaving this page will close the Inspector and the changes you have made will be lost.
 confirmNavigationAway.buttonLeave=Leave Page
 confirmNavigationAway.buttonLeaveAccesskey=L
 confirmNavigationAway.buttonStay=Stay on Page
 confirmNavigationAway.buttonStayAccesskey=S
--- a/browser/locales/en-US/chrome/browser/devtools/scratchpad.dtd
+++ b/browser/locales/en-US/chrome/browser/devtools/scratchpad.dtd
@@ -1,11 +1,17 @@
 <!-- LOCALIZATION NOTE : FILE This file contains the Scratchpad window strings -->
 <!-- LOCALIZATION NOTE : FILE Do not translate commandkeys -->
 
+<!-- LOCALIZATION NOTE : FILE The correct localization of this file might be to
+  - keep it in English, or another language commonly spoken among web developers.
+  - You want to make that choice consistent across the developer tools.
+  - A good criteria is the language in which you'd find the best
+  - documentation on web development on the web. -->
+
 <!-- LOCALIZATION NOTE (scratchpad.title):
   -  The Scratchpad is intended to provide a simple text editor for creating
   -  and evaluating bits of JavaScript code for the purposes of function
   -  prototyping, experimentation and convenient scripting.
   -
   -  It's quite possible that you won't have a good analogue for the word
   -  "Scratchpad" in your locale. You should feel free to find a close
   -  approximation to it or choose a word (or words) that means
--- a/browser/locales/en-US/chrome/browser/devtools/scratchpad.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/scratchpad.properties
@@ -1,8 +1,17 @@
+# LOCALIZATION NOTE These strings are used inside the JavaScript scratchpad
+# which is available from the Web Developer sub-menu -> 'Scratchpad'.
+#
+# The correct localization of this file might be to keep it in
+# English, or another language commonly spoken among web developers.
+# You want to make that choice consistent across the developer tools.
+# A good criteria is the language in which you'd find the best
+# documentation on web development on the web.
+
 # LOCALIZATION NOTE  (propertyPanel.updateButton.label): Used in the Property
 # Panel that is opened by the Scratchpad window when inspecting an object. This
 # is the Update button label.
 propertyPanel.updateButton.label=Update
 propertyPanel.updateButton.accesskey=U
 
 # LOCALIZATION NOTE  (export.fileOverwriteConfirmation): This is displayed when
 # the user attempts to save to an already existing file.
--- a/browser/locales/en-US/chrome/browser/devtools/styleinspector.dtd
+++ b/browser/locales/en-US/chrome/browser/devtools/styleinspector.dtd
@@ -1,8 +1,14 @@
+<!-- LOCALIZATION NOTE : FILE The correct localization of this file might be to
+  - keep it in English, or another language commonly spoken among web developers.
+  - You want to make that choice consistent across the developer tools.
+  - A good criteria is the language in which you'd find the best
+  - documentation on web development on the web. -->
+
 <!-- LOCALIZATION NOTE (userStylesLabel): This is the label for the checkbox
   -  that specifies whether the styles that are not from the user's stylesheet
   -  should be displayed or not. -->
 <!ENTITY userStylesLabel    "Only user styles">
 
 <!-- LOCALIZATION NOTE (userStylesSearch): This is the placeholder that goes in
   -  the search box when no search term has been entered. -->
 <!ENTITY userStylesSearch      "Search">
--- a/browser/locales/en-US/chrome/browser/devtools/styleinspector.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/styleinspector.properties
@@ -1,9 +1,16 @@
 # LOCALIZATION NOTE These strings are used inside the Style Inspector.
+#
+# The correct localization of this file might be to keep it in
+# English, or another language commonly spoken among web developers.
+# You want to make that choice consistent across the developer tools.
+# A good criteria is the language in which you'd find the best
+# documentation on web development on the web.
+
 
 # LOCALIZATION NOTE (panelTitle): This is the panel title
 panelTitle=Style Inspector
 
 # LOCALIZATION NOTE (rule.status): For each style property the panel shows
 # the rules which hold that specific property. For every rule, the rule status
 # is also displayed: a rule can be the best match, a match, a parent match, or a
 # rule did not match the element the user has highlighted.
--- a/browser/locales/en-US/chrome/browser/devtools/webConsole.dtd
+++ b/browser/locales/en-US/chrome/browser/devtools/webConsole.dtd
@@ -1,8 +1,14 @@
+<!-- LOCALIZATION NOTE : FILE The correct localization of this file might be to
+  - keep it in English, or another language commonly spoken among web developers.
+  - You want to make that choice consistent across the developer tools.
+  - A good criteria is the language in which you'd find the best
+  - documentation on web development on the web. -->
+
 <!ENTITY networkPanel.requestURL                  "Request URL">
 <!ENTITY networkPanel.requestMethod               "Request Method">
 <!ENTITY networkPanel.statusCode                  "Status Code">
 
 <!ENTITY networkPanel.requestHeaders              "Request Headers">
 <!ENTITY networkPanel.requestCookie               "Sent Cookie">
 <!ENTITY networkPanel.requestBody                 "Request Body">
 <!ENTITY networkPanel.requestFormData             "Sent Form Data">
--- a/browser/locales/en-US/chrome/browser/devtools/webconsole.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/webconsole.properties
@@ -1,8 +1,15 @@
+# LOCALIZATION NOTE
+# The correct localization of this file might be to keep it in
+# English, or another language commonly spoken among web developers.
+# You want to make that choice consistent across the developer tools.
+# A good criteria is the language in which you'd find the best
+# documentation on web development on the web.
+
 typeError=Error: 
 typeWarning=Warning: 
 typeNetwork=Network: 
 typeException=Exception:  
 typeCssParser=CSS Parser: 
 typeStrict=Strict Warning: 
 msgCategory=Category: 
 errLine=Line: %S
@@ -13,29 +20,27 @@ categoryConsole=Console:
 btnMutation=DOM Mutation
 tipMutation=Toggle DOM Mutation event logging
 btnPageNet=Net
 tipPageNet=Log network access
 btnPageCSS=CSS
 tipPageCSS=Log CSS parsing errors
 btnPageJS=JS
 tipPageJS=Log JavaScript exceptions
-# LOCALIZATION NOTE (btnPageWebDeveloper):
+# LOCALIZATION NOTE (btnPageLogging):
 #
-# This is used as the text of the "Web Developer" button on the toolbar. It
+# This is used as the text of the "Logging" button on the toolbar. It
 # shows or hides messages that the web developer inserted on the page for
-# debugging purposes, using calls such console.log() and console.error(). You
-# may wish to localize this as "Page" if that is clearer in your locale. See
-# bug 601667 for more information.
-btnPageWebDeveloper=Web Developer
-# LOCALIZATION NOTE (tipPageWebDeveloper):
+# debugging purposes, using calls such console.log() and console.error().
+btnPageLogging=Logging
+# LOCALIZATION NOTE (tipPageLogging):
 #
-# This is used as the text of the tool tip for the "Web Developer" button on
+# This is used as the text of the tool tip for the "Logging" button on
 # the toolbar.
-tipPageWebDeveloper=Log messages sent to the "console" object
+tipPageLogging=Log messages sent to the "console" object
 btnConsoleErrors=Errors
 tipConsoleErrors=Log calls to console.error()
 btnConsoleInfo=Info
 tipConsoleInfo=Log calls to console.info()
 btnConsoleWarnings=Warnings
 tipConsoleWarnings=Log calls to console.warn()
 btnConsoleLog=Log
 tipConsoleLog=Log calls to console.log()
--- a/toolkit/content/widgets/videocontrols.xml
+++ b/toolkit/content/widgets/videocontrols.xml
@@ -342,16 +342,21 @@
                          (this.video.paused || this.video.ended
                            ? this.video.readyState < this.video.HAVE_CURRENT_DATA
                            : this.video.readyState < this.video.HAVE_FUTURE_DATA)) ||
                         (this.timeUpdateCount <= 1 && !this.video.ended &&
                          this.video.readyState < this.video.HAVE_ENOUGH_DATA &&
                          this.video.networkState == this.video.NETWORK_LOADING))
                         show = true;
 
+                    // Explicitly hide the status fader if this
+                    // is audio only until bug 619421 is fixed.
+                    if (this.isAudioOnly)
+                        show = false;
+
                     this.log("Status overlay: seeking=" + this.video.seeking +
                              " error=" + this.video.error + " readyState=" + this.video.readyState +
                              " paused=" + this.video.paused + " ended=" + this.video.ended +
                              " networkState=" + this.video.networkState +
                              " timeUpdateCount=" + this.timeUpdateCount +
                              " --> " + (show ? "SHOW" : "HIDE"));
                     this.startFade(this.statusOverlay, show, immediate);
                 },
--- a/toolkit/themes/gnomestripe/global/webConsole.css
+++ b/toolkit/themes/gnomestripe/global/webConsole.css
@@ -208,17 +208,17 @@
   -moz-image-region: rect(16px, 16px, 24px, 8px);
 }
 
 .webconsole-msg-exception.webconsole-msg-warn {
   -moz-image-region: rect(16px, 24px, 24px, 16px);
 }
 
 /* Web Developer styles */
-.webconsole-filter-button[category="webdev"] {
+.webconsole-filter-button[category="logging"] {
   -moz-image-region: rect(24px, 8px, 32px, 0);
 }
 
 .webconsole-msg-console > .webconsole-msg-icon-container {
   -moz-border-start: solid #cbcbcb 6px;
 }
 
 .webconsole-msg-console.webconsole-msg-error,
--- a/toolkit/themes/pinstripe/global/webConsole.css
+++ b/toolkit/themes/pinstripe/global/webConsole.css
@@ -262,17 +262,17 @@
   -moz-image-region: rect(16px, 16px, 24px, 8px);
 }
 
 .webconsole-msg-exception.webconsole-msg-warn {
   -moz-image-region: rect(16px, 24px, 24px, 16px);
 }
 
 /* Web Developer styles */
-.webconsole-filter-button[category="webdev"] {
+.webconsole-filter-button[category="logging"] {
   -moz-image-region: rect(24px, 8px, 32px, 0);
 }
 
 .webconsole-msg-console > .webconsole-msg-icon-container {
   -moz-border-start: solid #cbcbcb 6px;
 }
 
 .webconsole-msg-console.webconsole-msg-error,
--- a/toolkit/themes/winstripe/global/webConsole.css
+++ b/toolkit/themes/winstripe/global/webConsole.css
@@ -213,17 +213,17 @@
   -moz-image-region: rect(16px, 16px, 24px, 8px);
 }
 
 .webconsole-msg-exception.webconsole-msg-warn {
   -moz-image-region: rect(16px, 24px, 24px, 16px);
 }
 
 /* Web Developer styles */
-.webconsole-filter-button[category="webdev"] {
+.webconsole-filter-button[category="logging"] {
   -moz-image-region: rect(24px, 8px, 32px, 0);
 }
 
 .webconsole-msg-console > .webconsole-msg-icon-container {
   -moz-border-start: solid #cbcbcb 6px;
 }
 
 .webconsole-msg-console.webconsole-msg-error,