Merge fx-team to central, a=merge
authorWes Kocher <wkocher@mozilla.com>
Fri, 02 Sep 2016 13:32:41 -0700
changeset 312478 d0830980ffdb36a10855d02a588b4869cad6707e
parent 312477 63d190efe42e5e4984180d315e16b70f6d99618c (current diff)
parent 312331 884f60cd86d31b32ec4883246ace726bc93e445b (diff)
child 312479 969397f22187cfd25fca153f0d1624dde9490589
child 312527 e6f34a71e9867245df7b4f338d62565b77512713
child 312556 00195e9e7d8b954681a8c2a0784442c33e690684
push id20447
push userkwierso@gmail.com
push dateFri, 02 Sep 2016 20:36:44 +0000
treeherderfx-team@969397f22187 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone51.0a1
Merge fx-team to central, a=merge
--- a/devtools/client/locales/en-US/animationinspector.properties
+++ b/devtools/client/locales/en-US/animationinspector.properties
@@ -21,27 +21,16 @@ panel.invalidElementSelected=No animatio
 # user to select a new node by clicking on the element-picker icon.
 panel.selectElement=Pick another element from the page.
 
 # LOCALIZATION NOTE (panel.allAnimations): This is the label shown at the bottom of
 # the panel, in a toolbar, to let the user know the toolbar applies to all
 # animations, not just the ones applying to the current element.
 panel.allAnimations=All animations
 
-# LOCALIZATION NOTE (player.animationNameLabel):
-# This string is displayed in each animation player widget. It is the label
-# displayed before the animation name.
-player.animationNameLabel=Animation:
-
-# LOCALIZATION NOTE (player.transitionNameLabel):
-# This string is displayed in each animation player widget. It is the label
-# displayed in the header, when the element is animated by mean of a css
-# transition
-player.transitionNameLabel=Transition
-
 # LOCALIZATION NOTE (player.animationDurationLabel):
 # This string is displayed in each animation player widget. It is the label
 # displayed before the animation duration.
 player.animationDurationLabel=Duration:
 
 # LOCALIZATION NOTE (player.animationDelayLabel):
 # This string is displayed in each animation player widget. It is the label
 # displayed before the animation delay.
--- a/devtools/client/locales/en-US/appcacheutils.properties
+++ b/devtools/client/locales/en-US/appcacheutils.properties
@@ -112,12 +112,8 @@ fallbackAsterisk2=Asterisk (*) incorrect
 # SETTINGS section containing something other than the valid "prefer-online"
 # or "fast". Parameters: %S is the line number where this error occurs.
 settingsBadValue=The SETTINGS section may only contain a single value, “prefer-online” or “fast” at line %S.
 
 # LOCALIZATION NOTE (invalidSectionName): the associated cache manifest
 # contains an invalid section name. Parameters: %1$S is the section name, %2$S
 # is the line number.
 invalidSectionName=Invalid section name (%1$S) at line %2$S.
-
-# LOCALIZATION NOTE (entryNotFound): the requested cache entry that does not
-# exist.
-entryNotFound=Entry not found.
--- a/devtools/client/locales/en-US/inspector.properties
+++ b/devtools/client/locales/en-US/inspector.properties
@@ -6,25 +6,16 @@
 # 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.message2=If you leave this page, the changes you have made will be lost.
-confirmNavigationAway.buttonLeave=Leave Page
-confirmNavigationAway.buttonLeaveAccesskey=L
-confirmNavigationAway.buttonStay=Stay on Page
-confirmNavigationAway.buttonStayAccesskey=S
-
 breadcrumbs.siblings=Siblings
 
 # LOCALIZATION NOTE (debuggerPausedWarning): Used in the Inspector tool, when
 # the user switch to the inspector when the debugger is paused.
 debuggerPausedWarning.message=Debugger is paused. Some features like mouse selection will not work.
 
 # LOCALIZATION NOTE (nodeMenu.tooltiptext)
 # This menu appears in the Infobar (on top of the highlighted node) once
@@ -294,17 +285,16 @@ inspectorCopyHTMLSubmenu.label=Copy
 # - Paste Inner HTML
 # - Paste Outer HTML
 # - Before
 # - After
 # - As First Child
 # - As Last Child
 inspectorPasteHTMLSubmenu.label=Paste
 
-
 # LOCALIZATION NOTE (inspector.searchHTML.key):
 # Key shortcut used to focus the DOM element search box on top-right corner of
 # the markup view
 inspector.searchHTML.key=CmdOrCtrl+F
 
 # LOCALIZATION NOTE (markupView.hide.key):
 # Key shortcut used to hide the selected node in the markup view.
 markupView.hide.key=h
--- a/devtools/client/locales/en-US/scratchpad.properties
+++ b/devtools/client/locales/en-US/scratchpad.properties
@@ -64,21 +64,16 @@ confirmRevert=Do you want to revert the 
 # you try to revert unsaved content of scratchpad.
 confirmRevert.title=Revert Changes
 
 # LOCALIZATION NOTE  (scratchpadIntro): This is a multi-line comment explaining
 # how to use the Scratchpad. Note that this should be a valid JavaScript
 # comment inside /* and */.
 scratchpadIntro1=/*\n * This is a JavaScript Scratchpad.\n *\n * Enter some JavaScript, then Right Click or choose from the Execute Menu:\n * 1. Run to evaluate the selected text (%1$S),\n * 2. Inspect to bring up an Object Inspector on the result (%2$S), or,\n * 3. Display to insert the result in a comment after the selection. (%3$S)\n */\n\n
 
-# LOCALIZATION NOTE  (scratchpad.noargs): This error message is shown when
-# Scratchpad instance is created without any arguments. Scratchpad window
-# expects to receive its unique identifier as the first window argument.
-scratchpad.noargs=Scratchpad was created without any arguments.
-
 # LOCALIZATION NOTE  (notification.browserContext): This is the message displayed
 # over the top of the editor when the user has switched to browser context.
 browserContext.notification=This scratchpad executes in the Browser context.
 
 # LOCALIZATION NOTE (help.openDocumentationPage): This returns a localized link with
 # documentation for Scratchpad on MDN.
 help.openDocumentationPage=https://developer.mozilla.org/en/Tools/Scratchpad
 
--- a/devtools/client/locales/en-US/styleeditor.properties
+++ b/devtools/client/locales/en-US/styleeditor.properties
@@ -4,22 +4,16 @@
 
 # LOCALIZATION NOTE These strings are used inside the Style Editor.
 # 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.
 
-# LOCALIZATION NOTE  (chromeWindowTitle): This is the title of the Style Editor
-# 'chrome' window. That is, the main window with the stylesheets list.
-# The argument is either the content document's title or its href if no title
-# is available.
-chromeWindowTitle=Style Editor [%S]
-
 # LOCALIZATION NOTE  (inlineStyleSheet): This is the name used for an style sheet
 # that is declared inline in the <style> element. Shown in the stylesheets list.
 # the argument is the index (order) of the containing <style> element in the
 # document.
 inlineStyleSheet=<inline style sheet #%S>
 
 # LOCALIZATION NOTE  (newStyleSheet): This is the default name for a new
 # user-created style sheet.
@@ -77,16 +71,8 @@ ToolboxStyleEditor.label=Style Editor
 # This is used as the label for the toolbox panel.
 ToolboxStyleEditor.panelLabel=Style Editor Panel
 
 # LOCALIZATION NOTE (ToolboxStyleEditor.tooltip3):
 # This string is displayed in the tooltip of the tab when the style editor is
 # displayed inside the developer tools window.
 # A keyboard shortcut for Stylesheet Editor will be shown inside the latter pair of brackets.
 ToolboxStyleEditor.tooltip3=Stylesheet Editor (CSS) (%S)
-
-# LOCALIZATION NOTE (confirmNavigationAway): Shown in a notification box when
-# the user tries to navigate away from a web page.
-confirmNavigationAway.message=If you leave this page, unsaved changes in the Style Editor will be lost.
-confirmNavigationAway.buttonLeave=Leave Page
-confirmNavigationAway.buttonLeaveAccesskey=L
-confirmNavigationAway.buttonStay=Stay on Page
-confirmNavigationAway.buttonStayAccesskey=S
--- a/devtools/client/locales/en-US/webaudioeditor.properties
+++ b/devtools/client/locales/en-US/webaudioeditor.properties
@@ -27,13 +27,8 @@ ToolboxWebAudioEditor1.tooltip=Web Audio
 
 # LOCALIZATION NOTE (collapseInspector): This is the tooltip for the button
 # that collapses the inspector in the web audio tool UI.
 collapseInspector=Collapse inspector
 
 # LOCALIZATION NOTE (expandInspector): This is the tooltip for the button
 # that expands the inspector in the web audio tool UI.
 expandInspector=Expand inspector
-
-# LOCALIZATION NOTE (webAudioEditorTooltipBypass): This is the tooltip for the
-# button that bypasses an AudioNode
-webAudioEditorTooltipBypass=Bypass AudioNode
-
--- a/devtools/client/locales/en-US/webconsole.properties
+++ b/devtools/client/locales/en-US/webconsole.properties
@@ -4,39 +4,16 @@
 
 # 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
-btnHide=Hide
-btnPrefs=Preferences
-categoryPage=Page:
-categoryConsole=Console:
-btnMutation=DOM Mutation
-tipMutation=Toggle DOM Mutation event logging
-btnGlobal=Global Messages
-tipGlobal=Toggle Global Message logging
-localConsole=Local Console
-clearConsoleCmd.label=Clear Console
-clearConsoleCmd.accesskey=e
-close.button=Close
-close.accesskey=C
-update.button=Update
-update.accesskey=U
 cmd.commandkey=K
 webConsoleCmd.accesskey=W
 
 # LOCALIZATION NOTE (timestampFormat): %1$02S = hours (24-hour clock),
 # %2$02S = minutes, %3$02S = seconds, %4$03S = milliseconds.
 timestampFormat=%02S:%02S:%02S.%03S
 
 helperFuncUnsupportedTypeError=Can’t call pprint on this type of object.
@@ -67,21 +44,16 @@ webConsoleMixedContentWarning=Mixed Cont
 # after security related web console messages.
 webConsoleMoreInfoLabel=Learn More
 
 # LOCALIZATION NOTE (scratchpad.linkText): the text used in the right hand
 # side of the Web Console command line when JavaScript is being entered, to
 # indicate how to jump into scratchpad mode.
 scratchpad.linkText=Shift+RETURN - Open in Scratchpad
 
-# LOCALIZATION NOTE (gcliterm.instanceLabel): the console displays objects
-# using their type (from the constructor function) in this descriptive string.
-# Parameters: %S is the object type.
-gcliterm.instanceLabel=Instance of %S
-
 # LOCALIZATION NOTE (reflow.*): the console displays reflow activity.
 # We can get 2 kind of lines: with JS link or without JS link. It looks like
 # that:
 # reflow: 12ms
 # reflow: 12ms function foobar, file.js line 42
 # The 2nd line, from "function" to the end of the line, is a link to the
 # JavaScript debugger.
 reflow.messageWithNoLink=reflow: %Sms
@@ -121,42 +93,16 @@ noCounterLabel=<no label>
 Autocomplete.blank=  <- no result
 
 maxTimersExceeded=The maximum allowed number of timers in this page was exceeded.
 
 # LOCALIZATION NOTE (maxCountersExceeded): Error message shown when the maximum
 # number of console.count()-counters was exceeded.
 maxCountersExceeded=The maximum allowed number of counters in this page was exceeded.
 
-# LOCALIZATION NOTE (JSTerm.updateNotInspectable): this string is used when
-# the user inspects an evaluation result in the Web Console and tries the
-# Update button, but the new result no longer returns an object that can be
-# inspected.
-JSTerm.updateNotInspectable=After your input has been re-evaluated the result is no longer inspectable.
-
-# LOCALIZATION NOTE (remoteWebConsolePromptTitle): the title displayed on the
-# Web Console prompt asking for the remote host and port to connect to.
-remoteWebConsolePromptTitle=Remote Connection
-
-# LOCALIZATION NOTE (remoteWebConsolePromptMessage): the message displayed on
-# the Web Console prompt asking for the remote host and port to connect to.
-remoteWebConsolePromptMessage=Enter hostname and port number (host:port)
-
-# LOCALIZATION NOTE (remoteWebConsoleSelectTabTitle): the title displayed on
-# the Web Console prompt asking the user to pick a tab to attach to.
-remoteWebConsoleSelectTabTitle=Tab list - Remote Connection
-
-# LOCALIZATION NOTE (remoteWebConsoleSelectTabMessage): the message displayed
-# on the Web Console prompt asking the user to pick a tab to attach to.
-remoteWebConsoleSelectTabMessage=Select one of the tabs you want to attach to, or select the global console.
-
-# LOCALIZATION NOTE (listTabs.globalConsoleActor): the string displayed for
-# the global console in the tabs selection.
-listTabs.globalConsoleActor=*Global Console*
-
 # LOCALIZATION NOTE (MenuWebconsole.label): the string displayed in the Tools
 # menu as a shortcut to open the devtools with the Web Console tab selected.
 MenuWebconsole.label=Web Console
 
 # LOCALIZATION NOTE (ToolboxTabWebconsole.label): the string displayed as the
 # label of the tab in the devtools window.
 ToolboxTabWebconsole.label=Console
 
@@ -174,28 +120,16 @@ ToolboxWebconsole.tooltip2=Web Console (
 # string. This string is clickable such that the rest of the string is
 # retrieved from the server.
 longStringEllipsis=[…]
 
 # LOCALIZATION NOTE (longStringTooLong): the string displayed after the user
 # tries to expand a long string.
 longStringTooLong=The string you are trying to view is too long to be displayed by the Web Console.
 
-# LOCALIZATION NOTE (NetworkPanel.fetchRemainingResponseContentLink): the
-# string  displayed in the network panel when the response body is only
-# partially available. Parameters: %S is the amount of bytes that need to be
-# fetched.
-NetworkPanel.fetchRemainingResponseContentLink=Fetch the remaining %S bytes
-
-# LOCALIZATION NOTE (NetworkPanel.fetchRemainingRequestContentLink): the
-# string displayed in the network panel when the request body is only
-# partially available. Parameters: %S is the amount of bytes that need to be
-# fetched.
-NetworkPanel.fetchRemainingRequestContentLink=Fetch the request body (%S bytes)
-
 # LOCALIZATION NOTE (connectionTimeout): message displayed when the Remote Web
 # Console fails to connect to the server due to a timeout.
 connectionTimeout=Connection timeout. Check the Error Console on both ends for potential error messages. Reopen the Web Console to try again.
 
 # LOCALIZATION NOTE (propertiesFilterPlaceholder): this is the text that
 # appears in the filter text box for the properties view container.
 propertiesFilterPlaceholder=Filter properties
 
--- a/mobile/android/base/java/org/mozilla/gecko/home/activitystream/ActivityStream.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/activitystream/ActivityStream.java
@@ -2,65 +2,63 @@
  * 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/. */
  package org.mozilla.gecko.home.activitystream;
 
 import android.content.Context;
 import android.database.Cursor;
 import android.os.Bundle;
-import android.support.v4.app.FragmentManager;
 import android.support.v4.app.LoaderManager;
 import android.support.v4.content.Loader;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.util.AttributeSet;
 import android.widget.FrameLayout;
 
 import org.mozilla.gecko.GeckoProfile;
 import org.mozilla.gecko.R;
-import org.mozilla.gecko.animation.PropertyAnimator;
-import org.mozilla.gecko.home.HomeBanner;
-import org.mozilla.gecko.home.HomeFragment;
-import org.mozilla.gecko.home.HomeScreen;
+import org.mozilla.gecko.home.HomePager;
 import org.mozilla.gecko.home.SimpleCursorLoader;
 import org.mozilla.gecko.home.activitystream.topsites.TopSitesPagerAdapter;
 
 public class ActivityStream extends FrameLayout {
-    private StreamRecyclerAdapter adapter;
+    private final StreamRecyclerAdapter adapter;
 
     private static final int LOADER_ID_HIGHLIGHTS = 0;
     private static final int LOADER_ID_TOPSITES = 1;
 
     public ActivityStream(Context context, AttributeSet attrs) {
         super(context, attrs);
 
         inflate(context, R.layout.as_content, this);
+
+        adapter = new StreamRecyclerAdapter();
+
+        RecyclerView rv = (RecyclerView) findViewById(R.id.activity_stream_main_recyclerview);
+
+        rv.setAdapter(adapter);
+        rv.setLayoutManager(new LinearLayoutManager(getContext()));
+        rv.setHasFixedSize(true);
+    }
+
+    void setOnUrlOpenListener(HomePager.OnUrlOpenListener listener) {
+        adapter.setOnUrlOpenListener(listener);
     }
 
     public void load(LoaderManager lm) {
-        // Signal to load data from storage as needed, compare with HomePager
-        RecyclerView rv = (RecyclerView) findViewById(R.id.activity_stream_main_recyclerview);
+        CursorLoaderCallbacks callbacks = new CursorLoaderCallbacks();
 
-        // TODO: we need to retrieve BrowserApp and pass it in as onUrlOpenListener. That will
-        // be simpler once we're a HomeFragment, but isn't so simple while we're still a View.
-        adapter = new StreamRecyclerAdapter(lm, null);
-        rv.setAdapter(adapter);
-        rv.setLayoutManager(new LinearLayoutManager(getContext()));
-        rv.setHasFixedSize(true);
-
-        CursorLoaderCallbacks callbacks = new CursorLoaderCallbacks();
         lm.initLoader(LOADER_ID_HIGHLIGHTS, null, callbacks);
         lm.initLoader(LOADER_ID_TOPSITES, null, callbacks);
     }
 
     public void unload() {
         adapter.swapHighlightsCursor(null);
         adapter.swapTopSitesCursor(null);
-        // Signal to clear data that has been loaded, compare with HomePager
     }
 
     /**
      * This is a temporary cursor loader. We'll probably need a completely new query for AS,
      * at that time we can switch to the new CursorLoader, as opposed to using our outdated
      * SimpleCursorLoader.
      */
     private static class HistoryLoader extends SimpleCursorLoader {
--- a/mobile/android/base/java/org/mozilla/gecko/home/activitystream/ActivityStreamHomeFragment.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/activitystream/ActivityStreamHomeFragment.java
@@ -24,13 +24,16 @@ public class ActivityStreamHomeFragment
     protected void load() {
         activityStream.load(getLoaderManager());
     }
 
     @Nullable
     @Override
     public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
                              @Nullable Bundle savedInstanceState) {
-        activityStream = (ActivityStream) inflater.inflate(R.layout.activity_stream, container, false);
+        if (activityStream == null) {
+            activityStream = (ActivityStream) inflater.inflate(R.layout.activity_stream, container, false);
+            activityStream.setOnUrlOpenListener(mUrlOpenListener);
+        }
 
         return activityStream;
     }
 }
--- a/mobile/android/base/java/org/mozilla/gecko/home/activitystream/StreamRecyclerAdapter.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/activitystream/StreamRecyclerAdapter.java
@@ -17,21 +17,19 @@ import org.mozilla.gecko.home.activityst
 import org.mozilla.gecko.home.activitystream.StreamItem.TopPanel;
 
 import java.lang.ref.WeakReference;
 
 public class StreamRecyclerAdapter extends RecyclerView.Adapter<StreamItem> {
     private Cursor highlightsCursor;
     private Cursor topSitesCursor;
 
-    private final WeakReference<LoaderManager> loaderManagerWeakReference;
-    private final HomePager.OnUrlOpenListener onUrlOpenListener;
+    private HomePager.OnUrlOpenListener onUrlOpenListener;
 
-    StreamRecyclerAdapter(LoaderManager lm, HomePager.OnUrlOpenListener onUrlOpenListener) {
-        loaderManagerWeakReference = new WeakReference<>(lm);
+    void setOnUrlOpenListener(HomePager.OnUrlOpenListener onUrlOpenListener) {
         this.onUrlOpenListener = onUrlOpenListener;
     }
 
     @Override
     public int getItemViewType(int position) {
         if (position == 0) {
             return TopPanel.LAYOUT_ID;
         } else if (position == getItemCount() - 1) {
--- a/mobile/android/base/resources/layout/activity_stream.xml
+++ b/mobile/android/base/resources/layout/activity_stream.xml
@@ -1,12 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <org.mozilla.gecko.home.activitystream.ActivityStreamHomeScreen xmlns:android="http://schemas.android.com/apk/res/android"
                                                       android:orientation="vertical"
                                                       android:layout_width="match_parent"
                                                       android:layout_height="match_parent"
-                                                      android:background="#FAFAFA">
-    <android.support.v7.widget.RecyclerView
-        android:id="@+id/activity_stream_main_recyclerview"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"/>
-
-</org.mozilla.gecko.home.activitystream.ActivityStreamHomeScreen>
+                                                      android:background="#FAFAFA"/>
--- a/mobile/android/base/resources/layout/as_content.xml
+++ b/mobile/android/base/resources/layout/as_content.xml
@@ -1,5 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <merge xmlns:android="http://schemas.android.com/apk/res/android"
        android:background="@android:color/white">
 
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/activity_stream_main_recyclerview"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"/>
 </merge>
\ No newline at end of file