Merge fx-team to m-c a=merge
authorWes Kocher <wkocher@mozilla.com>
Tue, 26 Aug 2014 17:09:57 -0700
changeset 223323 d851690b8255d2673c8a6f5350e061c442ae87c6
parent 223316 4f6affdf52b6db940cc6bacde684d765d99cfd12 (current diff)
parent 223322 a8944add4cb603273a8d62b7103f48368f8b0689 (diff)
child 223344 29faabfdb3b27980094dd5976dbe55bb64cb8ef7
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone34.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 fx-team to m-c a=merge
--- a/browser/base/content/browser-context.inc
+++ b/browser/base/content/browser-context.inc
@@ -363,17 +363,17 @@
                 label="&viewPartialSourceForMathMLCmd.label;"
                 accesskey="&viewPartialSourceCmd.accesskey;"
                 oncommand="gContextMenu.viewPartialSource('mathml');"
                 observes="isImage"/>
       <menuseparator id="context-sep-viewsource"/>
       <menuitem id="context-viewsource"
                 label="&viewPageSourceCmd.label;"
                 accesskey="&viewPageSourceCmd.accesskey;"
-                oncommand="BrowserViewSourceOfDocument(gContextMenu.browser.contentDocument);"
+                oncommand="BrowserViewSourceOfDocument(gContextMenu.browser.contentDocumentAsCPOW);"
                 observes="isImage"/>
       <menuitem id="context-viewinfo"
                 label="&viewPageInfoCmd.label;"
                 accesskey="&viewPageInfoCmd.accesskey;"
                 oncommand="gContextMenu.viewInfo();"/>
       <menuseparator id="spell-separator"/>
       <menuitem id="spell-check-enabled"
                 label="&spellCheckToggle.label;"
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -774,17 +774,19 @@
 
       <handler event="blur"><![CDATA[
         this._clearNoActions();
         this.formatValue();
       ]]></handler>
 
       <handler event="dragstart" phase="capturing"><![CDATA[
         // Drag only if the gesture starts from the input field.
-        if (event.originalTarget != this.inputField)
+        if (this.inputField != event.originalTarget && 
+            !(this.inputField.compareDocumentPosition(event.originalTarget) &
+              Node.DOCUMENT_POSITION_CONTAINED_BY))
           return;
 
         // Drag only if the entire value is selected and it's a valid URI.
         var isFullSelection = this.selectionStart == 0 &&
                               this.selectionEnd == this.textLength;
         if (!isFullSelection ||
             this.getAttribute("pageproxystate") != "valid")
           return;
--- a/browser/components/loop/content/js/panel.js
+++ b/browser/components/loop/content/js/panel.js
@@ -201,17 +201,17 @@ loop.panel = (function(_, mozL10n) {
           this.setState(this.getInitialState());
         }
       }
     },
 
     _generateMailTo: function() {
       return encodeURI([
         "mailto:?subject=" + __("share_email_subject2") + "&",
-        "body=" + __("share_email_body", {callUrl: this.state.callUrl})
+        "body=" + __("share_email_body2", {callUrl: this.state.callUrl})
       ].join(""));
     },
 
     handleEmailButtonClick: function(event) {
       // Note: side effect
       document.location = event.target.dataset.mailto;
     },
 
--- a/browser/components/loop/content/js/panel.jsx
+++ b/browser/components/loop/content/js/panel.jsx
@@ -201,17 +201,17 @@ loop.panel = (function(_, mozL10n) {
           this.setState(this.getInitialState());
         }
       }
     },
 
     _generateMailTo: function() {
       return encodeURI([
         "mailto:?subject=" + __("share_email_subject2") + "&",
-        "body=" + __("share_email_body", {callUrl: this.state.callUrl})
+        "body=" + __("share_email_body2", {callUrl: this.state.callUrl})
       ].join(""));
     },
 
     handleEmailButtonClick: function(event) {
       // Note: side effect
       document.location = event.target.dataset.mailto;
     },
 
--- a/browser/components/loop/content/shared/js/router.js
+++ b/browser/components/loop/content/shared/js/router.js
@@ -164,17 +164,17 @@ loop.shared.router = (function(l10n) {
      * Peer hung up. Notifies the user and ends the call.
      *
      * Event properties:
      * - {String} connectionId: OT session id
      *
      * @param {Object} event
      */
     _onPeerHungup: function() {
-      this._notifier.warnL10n("peer_ended_conversation");
+      this._notifier.warnL10n("peer_ended_conversation2");
       this.endCall();
     },
 
     /**
      * Network disconnected. Notifies the user and ends the call.
      */
     _onNetworkDisconnected: function() {
       this._notifier.warnL10n("network_disconnected");
--- a/browser/components/loop/standalone/content/l10n/data.ini
+++ b/browser/components/loop/standalone/content/l10n/data.ini
@@ -1,19 +1,19 @@
 ## LOCALIZATION NOTE: In this file, don't translate the part between {{..}}
 [en]
 call_has_ended=Your call has ended.
 call_timeout_notification_text=Your call did not go through.
 missing_conversation_info=Missing conversation information.
 network_disconnected=The network connection terminated abruptly.
-peer_ended_conversation=Your peer ended the conversation.
+peer_ended_conversation2=The person you were calling has ended the conversation.
 unable_retrieve_call_info=Unable to retrieve conversation information.
-hangup_button_title=Hangup
+hangup_button_title=Hang up
 mute_local_audio_button_title=Mute your audio
-unmute_local_audio_button_title=Unute your audio
+unmute_local_audio_button_title=Unmute your audio
 mute_local_video_button_title=Mute your video
 unmute_local_video_button_title=Unmute your video
 start_call=Start the call
 welcome=Welcome to the {{clientShortname}} web client.
 incompatible_browser=Incompatible Browser
 powered_by_webrtc=The audio and video components of {{clientShortname}} are powered by WebRTC.
 use_latest_firefox.innerHTML=Please try this link in a WebRTC-enabled browser, such as <a href="{{ff_url}}">{{brandShortname}}</a>.
 incompatible_device=Incompatible device
@@ -37,17 +37,16 @@ clientShortname=WebRTC!
 ## LOCALIZATION NOTE (call_url_creation_date_label): Example output: (from May 26, 2014)
 call_url_creation_date_label=(from {{call_url_creation_date}})
 
 [fr]
 call_has_ended=L'appel est terminé.
 call_timeout_notification_text=Votre appel n'a pas abouti.
 missing_conversation_info=Informations de communication manquantes.
 network_disconnected=La connexion réseau semble avoir été interrompue.
-peer_ended_conversation=Votre correspondant a mis fin à la communication.
 unable_retrieve_call_info=Impossible de récupérer les informations liées à cet appel.
 hangup_button_title=Terminer l'appel
 mute_local_audio_button_title=Couper la diffusion audio
 unmute_local_audio_button_title=Reprendre la diffusion audio
 mute_local_video_button_title=Couper la diffusion vidéo
 unmute_local_video_button_title=Reprendre la diffusion vidéo
 start_call=Démarrer l'appel
 welcome=Bienvenue sur {{clientShortname}}.
--- a/browser/components/loop/test/desktop-local/panel_test.js
+++ b/browser/components/loop/test/desktop-local/panel_test.js
@@ -250,17 +250,17 @@ describe("loop.panel", function() {
 
       beforeEach(function() {
         document.mozL10n.initialize({
           getStrings: function(key) {
             var text;
 
             if (key === "share_email_subject2")
               text = "email-subject";
-            else if (key === "share_email_body")
+            else if (key === "share_email_body2")
               text = "{{callUrl}}";
 
             return JSON.stringify({textContent: text});
           }
         });
       });
 
       it("should make a request to requestCallUrl", function() {
--- a/browser/components/loop/test/shared/router_test.js
+++ b/browser/components/loop/test/shared/router_test.js
@@ -160,17 +160,17 @@ describe("loop.shared.router", function(
         sinon.assert.calledOnce(router.endCall);
       });
 
       it("should warn the user when peer hangs up", function() {
         conversation.trigger("session:peer-hungup");
 
         sinon.assert.calledOnce(notifier.warnL10n);
         sinon.assert.calledWithExactly(notifier.warnL10n,
-                                       "peer_ended_conversation");
+                                       "peer_ended_conversation2");
 
       });
 
       it("should call endCall() when peer hangs up", function() {
         conversation.trigger("session:peer-hungup");
 
         sinon.assert.calledOnce(router.endCall);
       });
--- a/browser/components/preferences/applications.js
+++ b/browser/components/preferences/applications.js
@@ -1092,39 +1092,30 @@ var gApplicationsPane = {
    * Also note that enabledPlugin does not get updated when
    * plugin.disable_full_page_plugin_for_types changes, so even if we could use
    * enabledPlugin to get the plugin that would be used, we'd still need to
    * check the pref ourselves to find out if it's enabled.
    */
   _loadPluginHandlers: function() {
     "use strict";
 
-    let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-    let pluginTags = pluginHost.getPluginTags();
-
-    for (let i = 0; i < pluginTags.length; ++i) {
-      let pluginTag = pluginTags[i];
-
-      let mimeTypes = pluginTag.getMimeTypes();
-      for (let j = 0; j < mimeTypes.length; ++j) {
-        let type = mimeTypes[j];
+    let mimeTypes = navigator.mimeTypes;
 
-        let handlerInfoWrapper;
-        if (type in this._handledTypes)
-          handlerInfoWrapper = this._handledTypes[type];
-        else {
-          let wrappedHandlerInfo =
-            this._mimeSvc.getFromTypeAndExtension(type, null);
-          handlerInfoWrapper = new HandlerInfoWrapper(type, wrappedHandlerInfo);
-          handlerInfoWrapper.handledOnlyByPlugin = true;
-          this._handledTypes[type] = handlerInfoWrapper;
-        }
-
-        handlerInfoWrapper.pluginName = pluginTag.name;
+    for (let mimeType of mimeTypes) {
+      let handlerInfoWrapper;
+      if (mimeType.type in this._handledTypes) {
+        handlerInfoWrapper = this._handledTypes[mimeType.type];
+      } else {
+        let wrappedHandlerInfo =
+              this._mimeSvc.getFromTypeAndExtension(mimeType.type, null);
+        handlerInfoWrapper = new HandlerInfoWrapper(mimeType.type, wrappedHandlerInfo);
+        handlerInfoWrapper.handledOnlyByPlugin = true;
+        this._handledTypes[mimeType.type] = handlerInfoWrapper;
       }
+      handlerInfoWrapper.pluginName = mimeType.enabledPlugin.name;
     }
   },
 
   /**
    * Load the set of handlers defined by the application datastore.
    */
   _loadApplicationHandlers: function() {
     var wrappedHandlerInfos = this._handlerSvc.enumerate();
--- a/browser/components/preferences/in-content/applications.js
+++ b/browser/components/preferences/in-content/applications.js
@@ -1084,39 +1084,30 @@ var gApplicationsPane = {
    * Also note that enabledPlugin does not get updated when
    * plugin.disable_full_page_plugin_for_types changes, so even if we could use
    * enabledPlugin to get the plugin that would be used, we'd still need to
    * check the pref ourselves to find out if it's enabled.
    */
   _loadPluginHandlers: function() {
     "use strict";
 
-    let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-    let pluginTags = pluginHost.getPluginTags();
-
-    for (let i = 0; i < pluginTags.length; ++i) {
-      let pluginTag = pluginTags[i];
-
-      let mimeTypes = pluginTag.getMimeTypes();
-      for (let j = 0; j < mimeTypes.length; ++j) {
-        let type = mimeTypes[j];
+    let mimeTypes = navigator.mimeTypes;
 
-        let handlerInfoWrapper;
-        if (type in this._handledTypes)
-          handlerInfoWrapper = this._handledTypes[type];
-        else {
-          let wrappedHandlerInfo =
-            this._mimeSvc.getFromTypeAndExtension(type, null);
-          handlerInfoWrapper = new HandlerInfoWrapper(type, wrappedHandlerInfo);
-          handlerInfoWrapper.handledOnlyByPlugin = true;
-          this._handledTypes[type] = handlerInfoWrapper;
-        }
-
-        handlerInfoWrapper.pluginName = pluginTag.name;
+    for (let mimeType of mimeTypes) {
+      let handlerInfoWrapper;
+      if (mimeType.type in this._handledTypes) {
+        handlerInfoWrapper = this._handledTypes[mimeType.type];
+      } else {
+        let wrappedHandlerInfo =
+              this._mimeSvc.getFromTypeAndExtension(mimeType.type, null);
+        handlerInfoWrapper = new HandlerInfoWrapper(mimeType.type, wrappedHandlerInfo);
+        handlerInfoWrapper.handledOnlyByPlugin = true;
+        this._handledTypes[mimeType.type] = handlerInfoWrapper;
       }
+      handlerInfoWrapper.pluginName = mimeType.enabledPlugin.name;
     }
   },
 
   /**
    * Load the set of handlers defined by the application datastore.
    */
   _loadApplicationHandlers: function() {
     var wrappedHandlerInfos = this._handlerSvc.enumerate();
new file mode 100644
--- /dev/null
+++ b/browser/docs/UITelemetry.rst
@@ -0,0 +1,107 @@
+=======================
+UITelemetry data format
+=======================
+
+UI Telemetry sends its data as a JSON blob. This document describes the different parts
+of the JSON blob.
+
+``toolbars``
+------------
+
+This tracks the state of the user's UI customizations. It has the following properties:
+
+- ``sizemode`` - string indicating whether the window is in maximized, normal (restored) or
+  fullscreen mode;
+- ``bookmarksBarEnabled`` - boolean indicating whether the bookmarks bar is visible;
+- ``menuBarEnabled`` - boolean indicating whether the menu bar is visible (always false on OS X);
+- ``titleBarEnabled`` - boolean indicating whether the (real) titlebar is visible (rather than
+  having tabs in the titlebar);
+- ``defaultKept`` - list of strings identifying toolbar buttons and items that are still in their
+  default position. Only the IDs of builtin widgets are sent (ie not add-on widgets);
+- ``defaultMoved`` - list of strings identifying toolbar buttons and items that are no longer in
+  their default position, but have not been removed to the palette. Only the IDs of builtin widgets
+  are sent (ie not add-on widgets);
+- ``nondefaultAdded`` - list of strings identifying toolbar buttons and items that have been added
+  from the palette. Only the IDs of builtin widgets are sent (ie not add-on widgets);
+- ``defaultRemoved`` - list of strings identifying toolbar buttons and items that are in the
+  palette that are elsewhere by default. Only the IDs of builtin widgets are sent
+  (ie not add-on widgets);
+- ``addonToolbars`` - the number of non-default toolbars that are customizable. 1 by default
+  because it counts the add-on bar shim;
+- ``visibleTabs`` - array of the number of visible tabs per window;
+- ``hiddenTabs`` - array of the number of hidden tabs per window (ie tabs in panorama groups which
+  are not the current group);
+- ``countableEvents`` - please refer to the next section.
+- ``durations`` - an object mapping descriptions to duration records, which records the amount of
+  time a user spent doing something. Currently only has one property:
+   - ``customization`` - how long a user spent customizing the browser. This is an array of
+     objects, where each object has a ``duration`` property indicating the time in milliseconds,
+     and a ``bucket`` property indicating a bucket in which the duration info falls.
+
+``countableEvents``
+-------------------
+
+Countable events are stored under the ``toolbars`` section. They count the number of times certain
+events happen. No timing or other correlating information is stored - purely the number of times
+things happen.
+
+``countableEvents`` is an object with properties representing buckets. In each bucket, there is an
+object with the following properties:
+
+- ``click-builtin-item`` is an object tracking clicks on builtin customizable toolbar items, keyed
+  off the item IDs, with an object for each item with keys ``left``, ``middle`` and ``right`` each
+  storing a number indicating how often the respective type of click has happened.
+- ``click-menu-button`` is the same, except the item ID is always 'button'.
+- ``click-bookmarks-bar`` is the same, with the item IDs being replaced by either ``container`` for
+  clicks on bookmark or livemark folders, and ``item`` for individual bookmarks.
+- ``click-menubar`` is similar, with the item IDs being replaced by one of ``menu``, ``menuitem``
+  or ``other``, depending on the kind of item clicked. Note that this is not tracked on OS X, where
+  we can't listen for these events because of the global menubar.
+- ``click-bookmarks-menu-button`` is also similar, with the item IDs being replaced by:
+   - ``menu`` for clicks on the 'menu' part of the item;
+   - ``add`` for clicks that add a bookmark;
+   - ``edit`` for clicks that open the panel to edit an existing bookmark;
+   - ``in-panel`` for clicks when the button is in the menu panel, and clicking it does none of the
+     above;
+- ``customize`` tracks different types of customization events without the ``left``, ``middle`` and
+  ``right`` distinctions. The different events are the following, with each storing a count of the
+  number of times they occurred:
+   - ``start`` counts the number of times the user starts customizing;
+   - ``add`` counts the number of times an item is added somewhere from the palette;
+   - ``move`` counts the number of times an item is moved somewhere else (but not to the palette);
+   - ``remove`` counts the number of times an item is removed to the palette;
+   - ``reset`` counts the number of times the 'restore defaults' button is used;
+
+
+``UITour``
+----------
+The UI Tour has its own section in the UI Telemetry output, outside of the ``toolbars`` section.
+It has a single property ``seenPageIDs`` which tracks which UI Tour pages have been run.
+
+``contextmenu``
+---------------
+We track context menu interactions to figure out which ones are most often used and/or how
+effective they are. In the ``contextmenu`` object, we first store things per-bucket. Next, we
+divide the following different context menu situations:
+
+- ``selection`` if there is content on the page that's selected on which the user clicks;
+- ``link`` if the user opened the context menu for a link
+- ``image-link`` if the user opened the context menu on an image or canvas that's a link;
+- ``image`` if the user opened the context menu on an image (that isn't a link);
+- ``canvas`` if the user opened the context menu on a canvas (that isn't a link);
+- ``media`` if the user opened the context menu on an HTML video or audio element;
+- ``input`` if the user opened the context menu on a text input element;
+- ``social`` if the user opened the context menu inside a social frame;
+- ``other`` for all other openings of the content menu;
+
+Each of these objects (if they exist) then gets a "withcustom" and/or a "withoutcustom" property
+for context menus opened with custom page-created items and without them, and each of those
+properties holds an object with IDs corresponding to a count of how often an item with that ID was
+activated in the context menu. Only builtin context menu items are tracked, and besides those items
+there are four special items which get counts:
+
+- ``close-without-interaction`` is incremented when the user closes the context menu without interacting with it;
+- ``custom-page-item`` is incremented when the user clicks an item that was created by the page;
+- ``unknown`` is incremented when an item without an ID was clicked;
+- ``other-item`` is incremented when an add-on-provided menuitem is clicked.
+
new file mode 100644
--- /dev/null
+++ b/browser/docs/index.rst
@@ -0,0 +1,9 @@
+=======
+Firefox
+=======
+
+This is the nascent documentation of the Firefox front-end code.
+
+.. toctree::
+   :maxdepth: 1
+
--- a/browser/locales/en-US/chrome/browser/loop/loop.properties
+++ b/browser/locales/en-US/chrome/browser/loop/loop.properties
@@ -16,23 +16,23 @@ unable_retrieve_url=Sorry, we were unabl
 
 incoming_call_title=Incoming Call…
 incoming_call=Incoming call
 incoming_call_answer_button=Answer
 incoming_call_answer_audio_only_tooltip=Answer with voice
 incoming_call_decline_button=Decline
 incoming_call_decline_and_block_button=Decline and Block
 incoming_call_block_button=Block
-hangup_button_title=Hangup
+hangup_button_title=Hang up
 mute_local_audio_button_title=Mute your audio
 unmute_local_audio_button_title=Unmute your audio
 mute_local_video_button_title=Mute your video
 unmute_local_video_button_title=Unmute your video
 
-peer_ended_conversation=Your peer ended the conversation.
+peer_ended_conversation2=The person you were calling has ended the conversation.
 call_has_ended=Your call has ended.
 
 cannot_start_call_session_not_ready=Can't start call, session is not ready.
 network_disconnected=The network connection terminated abruptly.
 
 connection_error_see_console_notification=Call failed; see console for details.
 
 ## LOCALIZATION NOTE (legal_text_and_links2): In this item, don't translate the
@@ -54,14 +54,14 @@ feedback_category_other=Other:
 feedback_custom_category_text_placeholder=What went wrong?
 feedback_submit_button=Submit
 feedback_back_button=Back
 ## LOCALIZATION NOTE (feedback_window_will_close_in): In this item, don't
 ## translate the part between {{..}}
 feedback_window_will_close_in=This window will close in {{countdown}} seconds
 
 share_email_subject2=Invitation to chat
-## LOCALIZATION NOTE (share_email_body): In this item, don't translate the
-## part between {{..}} and let the \r\n\r\n part
-share_email_body=Please click that link to call me back:\r\n\r\n{{callUrl}}
+## LOCALIZATION NOTE (share_email_body2): In this item, don't translate the
+## part between {{..}} and leave the \r\n\r\n part alone
+share_email_body2=Please click this link to call me:\r\n\r\n{{callUrl}}
 share_button=Email
 copy_url_button=Copy
 copied_url_button=Copied!
--- a/browser/moz.build
+++ b/browser/moz.build
@@ -1,16 +1,18 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
 CONFIGURE_SUBST_FILES += ['installer/Makefile']
 
+SPHINX_TREES['browser'] = 'docs'
+
 DIRS += [
     'base',
     'components',
     'experiments',
     'fuel',
     'locales',
     'modules',
     'themes',