Merge fx-team to m-c. a=merge
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 19 Feb 2015 18:57:18 -0500
changeset 257039 51458a066fda3375cf6abecca6bc3da61be56f70
parent 257019 56f090df548043a787a537e076b8346c7d660ee4 (current diff)
parent 257038 cee52e6c3662bbdb135c2f7e56f9b3dbd8ff12d2 (diff)
child 257040 28fde3b237eca85957406525da74f5fb148e7a69
child 257045 abec19b886f43d6602fcf7902b9388972b44caf2
child 257056 d64f901863d6908e409913a7ce1ae231c34769c7
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone38.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 CLOSED TREE
mobile/android/base/resources/drawable-hdpi/favicon.png
mobile/android/base/resources/drawable-large-hdpi-v11/new_tablet_default_favicon.png
mobile/android/base/resources/drawable-large-mdpi-v11/new_tablet_default_favicon.png
mobile/android/base/resources/drawable-large-xhdpi-v11/new_tablet_default_favicon.png
mobile/android/base/resources/drawable-large-xxhdpi-v11/new_tablet_default_favicon.png
mobile/android/base/resources/drawable-mdpi/favicon.png
mobile/android/base/resources/drawable-xhdpi/favicon.png
mobile/android/base/resources/drawable/new_tablet_default_favicon.xml
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_597136_network_requests_from_chrome.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_597136_network_requests_from_chrome.js
@@ -6,17 +6,18 @@
 
 const TEST_URI = "http://example.com/";
 
 let good = true;
 let listener = {
     QueryInterface: XPCOMUtils.generateQI([ Ci.nsIObserver ]),
     observe: function(aSubject, aTopic, aData) {
         if (aSubject instanceof Ci.nsIScriptError &&
-                aSubject.category === "XPConnect JavaScript") {
+            aSubject.category === "XPConnect JavaScript" &&
+            aSubject.sourceName.contains("webconsole")) {
             good = false;
         }
     }
 };
 
 let xhr;
 
 function test() {
--- a/configure.in
+++ b/configure.in
@@ -3948,17 +3948,16 @@ MOZ_ANDROID_HISTORY=
 MOZ_WEBSMS_BACKEND=
 MOZ_ANDROID_BEAM=
 MOZ_LOCALE_SWITCHER=
 MOZ_ANDROID_READING_LIST_SERVICE=
 MOZ_ANDROID_SEARCH_ACTIVITY=
 MOZ_ANDROID_DOWNLOADS_INTEGRATION=
 MOZ_ANDROID_MLS_STUMBLER=
 MOZ_ANDROID_SHARE_OVERLAY=
-MOZ_ANDROID_NEW_TABLET_UI=
 ACCESSIBILITY=1
 MOZ_TIME_MANAGER=
 MOZ_PAY=
 MOZ_AUDIO_CHANNEL_MANAGER=
 NSS_NO_LIBPKIX=
 MOZ_CONTENT_SANDBOX=
 MOZ_GMP_SANDBOX=
 MOZ_SANDBOX=1
@@ -5038,24 +5037,16 @@ fi
 dnl = Include Tab Queue on Android
 dnl = Temporary build flag to allow development in Nightly
 dnl ========================================================
 if test -n "$MOZ_ANDROID_TAB_QUEUE"; then
     AC_DEFINE(MOZ_ANDROID_TAB_QUEUE)
 fi
 
 dnl ========================================================
-dnl = Include New Tablet UI on Android
-dnl = Temporary build flag to allow development in Nightly
-dnl ========================================================
-if test -n "$MOZ_ANDROID_NEW_TABLET_UI"; then
-    AC_DEFINE(MOZ_ANDROID_NEW_TABLET_UI)
-fi
-
-dnl ========================================================
 dnl = Enable IPDL's "expensive" unit tests
 dnl ========================================================
 MOZ_IPDL_TESTS=
 
 MOZ_ARG_ENABLE_BOOL(ipdl-tests,
 [  --enable-ipdl-tests     Enable expensive IPDL tests],
     MOZ_IPDL_TESTS=1,
     MOZ_IPDL_TESTS=)
@@ -8543,17 +8534,16 @@ AC_SUBST(MOZ_ANDROID_HISTORY)
 AC_SUBST(MOZ_WEBSMS_BACKEND)
 AC_SUBST(MOZ_ANDROID_BEAM)
 AC_SUBST(MOZ_LOCALE_SWITCHER)
 AC_SUBST(MOZ_DISABLE_GECKOVIEW)
 AC_SUBST(MOZ_ANDROID_READING_LIST_SERVICE)
 AC_SUBST(MOZ_ANDROID_SEARCH_ACTIVITY)
 AC_SUBST(MOZ_ANDROID_SHARE_OVERLAY)
 AC_SUBST(MOZ_ANDROID_TAB_QUEUE)
-AC_SUBST(MOZ_ANDROID_NEW_TABLET_UI)
 AC_SUBST(MOZ_ANDROID_MLS_STUMBLER)
 AC_SUBST(MOZ_ANDROID_DOWNLOADS_INTEGRATION)
 AC_SUBST(ENABLE_STRIP)
 AC_SUBST(PKG_SKIP_STRIP)
 AC_SUBST(STRIP_FLAGS)
 AC_SUBST(USE_ELF_HACK)
 AC_SUBST(INCREMENTAL_LINKER)
 AC_SUBST(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS)
--- a/mobile/android/base/favicons/Favicons.java
+++ b/mobile/android/base/favicons/Favicons.java
@@ -1,38 +1,37 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
  * 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.favicons;
 
+import android.graphics.drawable.Drawable;
 import org.mozilla.gecko.AboutPages;
-import org.mozilla.gecko.AppConstants;
 import org.mozilla.gecko.GeckoAppShell;
-import org.mozilla.gecko.NewTabletUI;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.Tab;
 import org.mozilla.gecko.Tabs;
 import org.mozilla.gecko.db.BrowserDB;
 import org.mozilla.gecko.favicons.cache.FaviconCache;
 import org.mozilla.gecko.util.GeckoJarReader;
 import org.mozilla.gecko.util.NonEvictingLruCache;
 import org.mozilla.gecko.util.ThreadUtils;
 
 import android.content.ContentResolver;
 import android.content.Context;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
+import android.graphics.drawable.BitmapDrawable;
 import android.text.TextUtils;
 import android.util.Log;
 import android.util.SparseArray;
 
-import java.io.File;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.concurrent.ExecutorService;
@@ -445,39 +444,32 @@ public class Favicons {
      * @param context A reference to the GeckoApp instance.
      */
     public static void initializeWithContext(Context context) throws IllegalStateException {
         // Prevent multiple-initialisation.
         if (!isInitialized.compareAndSet(false, true)) {
             return;
         }
 
-        final boolean isNewTabletEnabled = NewTabletUI.isEnabled(context);
         final Resources res = context.getResources();
 
-        // Decode the default Favicon ready for use. We'd preferably override the drawable for
-        // different screen sizes, but since we need phone's default favicon on tablet (in
-        // ToolbarDisplayLayout), we can't.
-        final int defaultFaviconDrawableID =
-                isNewTabletEnabled ? R.drawable.new_tablet_default_favicon : R.drawable.favicon;
-        defaultFavicon = BitmapFactory.decodeResource(res, defaultFaviconDrawableID);
-        if (defaultFavicon == null) {
-            throw new IllegalStateException("Null default favicon was returned from the resources system!");
+        final Drawable defaultFaviconDrawable = res.getDrawable(R.drawable.toolbar_favicon_default);
+        if (defaultFaviconDrawable instanceof BitmapDrawable) {
+            defaultFavicon = ((BitmapDrawable) defaultFaviconDrawable).getBitmap();
+        } else {
+            throw new IllegalStateException("toolbar_favicon_default wasn't a bitmap resource!");
         }
 
         defaultFaviconSize = res.getDimensionPixelSize(R.dimen.favicon_bg);
 
         // Screen-density-adjusted upper limit on favicon size. Favicons larger than this are
         // downscaled to this size or discarded.
         largestFaviconSize = res.getDimensionPixelSize(R.dimen.favicon_largest_interesting_size);
 
-        // TODO: Remove this branch when old tablet is removed.
-        final int browserToolbarFaviconSizeDimenID = NewTabletUI.isEnabled(context) ?
-                R.dimen.new_tablet_tab_strip_favicon_size : R.dimen.browser_toolbar_favicon_size;
-        browserToolbarFaviconSize = res.getDimensionPixelSize(browserToolbarFaviconSizeDimenID);
+        browserToolbarFaviconSize = res.getDimensionPixelSize(R.dimen.browser_toolbar_favicon_size);
 
         faviconsCache = new FaviconCache(FAVICON_CACHE_SIZE_BYTES, largestFaviconSize);
 
         // Initialize page mappings for each of our special pages.
         for (String url : AboutPages.getDefaultIconPages()) {
             pageURLMappings.putWithoutEviction(url, BUILT_IN_FAVICON_URL);
         }
 
--- a/mobile/android/base/home/TopSitesGridItemView.java
+++ b/mobile/android/base/home/TopSitesGridItemView.java
@@ -30,16 +30,18 @@ public class TopSitesGridItemView extend
     // Empty state, to denote there is no valid url.
     private static final int[] STATE_EMPTY = { android.R.attr.state_empty };
 
     private static final ScaleType SCALE_TYPE_FAVICON   = ScaleType.CENTER;
     private static final ScaleType SCALE_TYPE_RESOURCE  = ScaleType.CENTER;
     private static final ScaleType SCALE_TYPE_THUMBNAIL = ScaleType.CENTER_CROP;
     private static final ScaleType SCALE_TYPE_URL       = ScaleType.CENTER_INSIDE;
 
+    private static final int THUMBNAIL_DEFAULT_FAVICON_ID = R.drawable.favicon_globe;
+
     // Child views.
     private final TextView mTitleView;
     private final TopSitesThumbnailView mThumbnailView;
 
     // Data backing this view.
     private String mTitle;
     private String mUrl;
     private String mFaviconURL;
@@ -211,17 +213,17 @@ public class TopSitesGridItemView extend
     /**
      * Display the thumbnail from a bitmap.
      *
      * @param thumbnail The bitmap to show as thumbnail.
      */
     public void displayThumbnail(Bitmap thumbnail) {
         if (thumbnail == null) {
             // Show a favicon based view instead.
-            displayThumbnail(R.drawable.favicon);
+            displayThumbnail(THUMBNAIL_DEFAULT_FAVICON_ID);
             return;
         }
         mThumbnailSet = true;
         Favicons.cancelFaviconLoad(mLoadId);
         ImageLoader.with(getContext()).cancelRequest(mThumbnailView);
 
         mThumbnailView.setScaleType(SCALE_TYPE_THUMBNAIL);
         mThumbnailView.setImageBitmap(thumbnail, true);
@@ -237,17 +239,17 @@ public class TopSitesGridItemView extend
     public void displayThumbnail(final String imageUrl, final int bgColor) {
         mThumbnailView.setScaleType(SCALE_TYPE_URL);
         mThumbnailView.setBackgroundColor(bgColor);
         mThumbnailSet = true;
 
         ImageLoader.with(getContext())
                    .load(imageUrl)
                    .noFade()
-                   .error(R.drawable.favicon)
+                   .error(THUMBNAIL_DEFAULT_FAVICON_ID)
                    .into(mThumbnailView);
     }
 
     public void displayFavicon(Bitmap favicon, String faviconURL, int expectedLoadId) {
         if (mLoadId != Favicons.NOT_LOADING &&
             mLoadId != expectedLoadId) {
             // View recycled.
             return;
@@ -265,17 +267,17 @@ public class TopSitesGridItemView extend
     public void displayFavicon(Bitmap favicon, String faviconURL) {
         if (mThumbnailSet) {
             // Already showing a thumbnail; do nothing.
             return;
         }
 
         if (favicon == null) {
             // Should show default favicon.
-            displayThumbnail(R.drawable.favicon);
+            displayThumbnail(THUMBNAIL_DEFAULT_FAVICON_ID);
             return;
         }
 
         if (faviconURL != null) {
             mFaviconURL = faviconURL;
         }
 
         mThumbnailView.setScaleType(SCALE_TYPE_FAVICON);
--- a/mobile/android/base/home/TopSitesPanel.java
+++ b/mobile/android/base/home/TopSitesPanel.java
@@ -654,17 +654,17 @@ public class TopSitesPanel extends HomeF
             LoadIDAwareFaviconLoadedListener listener = new LoadIDAwareFaviconLoadedListener(view);
             final int loadId = Favicons.getSizedFaviconForPageFromLocal(context, url, listener);
             if (loadId == Favicons.LOADED) {
                 // Great!
                 return;
             }
 
             // Otherwise, do this until the async lookup returns.
-            view.displayThumbnail(R.drawable.favicon);
+            view.displayThumbnail(R.drawable.favicon_globe);
 
             // Give each side enough information to shake hands later.
             listener.setLoadId(loadId);
             view.setLoadId(loadId);
         }
 
         @Override
         public View newView(Context context, Cursor cursor, ViewGroup parent) {
--- a/mobile/android/base/menu/GeckoMenuInflater.java
+++ b/mobile/android/base/menu/GeckoMenuInflater.java
@@ -126,32 +126,17 @@ public class GeckoMenuInflater extends M
         item.id = a.getResourceId(R.styleable.MenuItem_android_id, NO_ID);
         item.order = a.getInt(R.styleable.MenuItem_android_orderInCategory, 0);
         item.title = a.getText(R.styleable.MenuItem_android_title);
         item.checkable = a.getBoolean(R.styleable.MenuItem_android_checkable, false);
         item.checked = a.getBoolean(R.styleable.MenuItem_android_checked, false);
         item.visible = a.getBoolean(R.styleable.MenuItem_android_visible, true);
         item.enabled = a.getBoolean(R.styleable.MenuItem_android_enabled, true);
         item.hasSubMenu = false;
-
-        // TODO: (bug 1058909) Remove this branch when we remove old tablet. We do this to
-        // avoid using a new menu resource for new tablet.
-        final int iconResID;
-        if (!NewTabletUI.isEnabled(mContext)) {
-            iconResID = a.getResourceId(R.styleable.MenuItem_android_icon, 0);
-        } else {
-            if (item.id == R.id.reload) {
-                iconResID = R.drawable.new_tablet_ic_menu_reload;
-            } else if (HardwareUtils.isLargeTablet() && item.id == R.id.bookmark) {
-                iconResID = R.drawable.new_tablet_ic_menu_bookmark_add;
-            } else {
-                iconResID = a.getResourceId(R.styleable.MenuItem_android_icon, 0);
-            }
-        }
-        item.iconRes = iconResID;
+        item.iconRes = a.getResourceId(R.styleable.MenuItem_android_icon, 0);
 
         if (Versions.feature11Plus) {
             item.showAsAction = a.getInt(R.styleable.MenuItem_android_showAsAction, 0);
         }
 
         a.recycle();
     }
 
--- a/mobile/android/base/menu/MenuItemActionBar.java
+++ b/mobile/android/base/menu/MenuItemActionBar.java
@@ -17,19 +17,17 @@ public class MenuItemActionBar extends T
                                implements GeckoMenuItem.Layout {
     private static final String LOGTAG = "GeckoMenuItemActionBar";
 
     public MenuItemActionBar(Context context) {
         this(context, null);
     }
 
     public MenuItemActionBar(Context context, AttributeSet attrs) {
-        // TODO: Remove this branch (and associated attr) when old tablet is removed.
-        this(context, attrs, (NewTabletUI.isEnabled(context)) ?
-                R.attr.menuItemActionBarStyleNewTablet : R.attr.menuItemActionBarStyle);
+        this(context, attrs, R.attr.menuItemActionBarStyle);
     }
 
     public MenuItemActionBar(Context context, AttributeSet attrs, int defStyle) {
         super(context, attrs, defStyle);
     }
 
     @Override
     public void initialize(GeckoMenuItem item) {
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -555,17 +555,17 @@ if CONFIG['MOZ_ANDROID_SHARE_OVERLAY']:
 
 if (CONFIG['MOZ_ANDROID_MAX_SDK_VERSION']):
     max_sdk_version = int(CONFIG['MOZ_ANDROID_MAX_SDK_VERSION'])
 else:
     max_sdk_version = 999
 
 # Only bother to include new tablet code if we're building for tablet-capable
 # OS releases.
-if CONFIG['MOZ_ANDROID_NEW_TABLET_UI'] and max_sdk_version >= 11:
+if max_sdk_version >= 11:
     gbjar.sources += [
         'tabs/TabStrip.java',
         'tabs/TabStripAdapter.java',
         'tabs/TabStripItemView.java',
         'tabs/TabStripView.java'
     ]
 
 # Selectively include reading list service code.
@@ -679,17 +679,17 @@ ANDROID_RES_DIRS += [
 ANDROID_GENERATED_RESFILES += [
     'res/raw/suggestedsites.json',
     'res/values/strings.xml',
 ]
 
 for var in ('MOZ_ANDROID_ANR_REPORTER', 'MOZ_LINKER_EXTRACT', 'MOZILLA_OFFICIAL', 'MOZ_DEBUG',
             'MOZ_ANDROID_SEARCH_ACTIVITY', 'MOZ_NATIVE_DEVICES', 'MOZ_ANDROID_MLS_STUMBLER',
             'MOZ_ANDROID_SHARE_OVERLAY', 'MOZ_ANDROID_DOWNLOADS_INTEGRATION',
-            'MOZ_ANDROID_NEW_TABLET_UI', 'MOZ_ANDROID_TAB_QUEUE'):
+            'MOZ_ANDROID_TAB_QUEUE'):
     if CONFIG[var]:
         DEFINES[var] = 1
 
 for var in ('MOZ_UPDATER', 'MOZ_PKG_SPECIAL'):
     if CONFIG[var]:
         DEFINES[var] = CONFIG[var]
 
 for var in ('ANDROID_PACKAGE_NAME', 'ANDROID_CPU_ARCH',
rename from mobile/android/base/resources/drawable-hdpi/favicon.png
rename to mobile/android/base/resources/drawable-hdpi/favicon_globe.png
rename from mobile/android/base/resources/drawable-large-hdpi-v11/new_tablet_default_favicon.png
rename to mobile/android/base/resources/drawable-large-hdpi-v11/toolbar_favicon_default.png
rename from mobile/android/base/resources/drawable-large-mdpi-v11/new_tablet_default_favicon.png
rename to mobile/android/base/resources/drawable-large-mdpi-v11/toolbar_favicon_default.png
--- a/mobile/android/base/resources/drawable-large-v11/new_tablet_site_security_unknown.xml
+++ b/mobile/android/base/resources/drawable-large-v11/new_tablet_site_security_unknown.xml
@@ -2,11 +2,11 @@
 <!-- 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/. -->
 
 <!-- The favicon drawable is not the same dimensions as the site security
      lock icons so we offset it using this drawable to compensate. -->
 <inset
     xmlns:android="http://schemas.android.com/apk/res/android"
-    android:drawable="@drawable/favicon"
+    android:drawable="@drawable/favicon_globe"
     android:insetTop="@dimen/new_tablet_site_security_unknown_inset_top"
     android:insetBottom="@dimen/new_tablet_site_security_unknown_inset_bottom"/>
rename from mobile/android/base/resources/drawable-large-xhdpi-v11/new_tablet_default_favicon.png
rename to mobile/android/base/resources/drawable-large-xhdpi-v11/toolbar_favicon_default.png
rename from mobile/android/base/resources/drawable-large-xxhdpi-v11/new_tablet_default_favicon.png
rename to mobile/android/base/resources/drawable-large-xxhdpi-v11/toolbar_favicon_default.png
rename from mobile/android/base/resources/drawable-mdpi/favicon.png
rename to mobile/android/base/resources/drawable-mdpi/favicon_globe.png
rename from mobile/android/base/resources/drawable-xhdpi/favicon.png
rename to mobile/android/base/resources/drawable-xhdpi/favicon_globe.png
deleted file mode 100644
--- a/mobile/android/base/resources/drawable/new_tablet_default_favicon.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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/. -->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-        android:src="@null"/>
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/drawable/toolbar_favicon_default.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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/. -->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+        android:src="@drawable/favicon_globe" />
--- a/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml
+++ b/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml
@@ -77,16 +77,17 @@
                         android:layout_marginLeft="16dp"
                         android:layout_marginRight="16dp"
                         android:layout="@layout/new_tablet_tabs_counter"/>
 
     <org.mozilla.gecko.widget.ThemedImageButton
             android:id="@+id/menu"
             style="@style/UrlBar.ImageButton.NewTablet"
             android:layout_alignParentRight="true"
+            android:layout_marginRight="6dp"
             android:contentDescription="@string/menu"
             android:background="@drawable/new_tablet_action_bar_button"
             android:visibility="gone"/>
 
     <org.mozilla.gecko.widget.ThemedImageView
             android:id="@+id/menu_icon"
             style="@style/UrlBar.ImageButton.NewTablet"
             android:layout_alignLeft="@id/menu"
--- a/mobile/android/base/resources/layout-large-v11/tab_strip_item_view.xml
+++ b/mobile/android/base/resources/layout-large-v11/tab_strip_item_view.xml
@@ -3,17 +3,17 @@
    - 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/. -->
 
 <merge xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:gecko="http://schemas.android.com/apk/res-auto">
 
    <ImageView
         android:id="@+id/favicon"
-        android:layout_width="@dimen/new_tablet_tab_strip_favicon_size"
+        android:layout_width="@dimen/browser_toolbar_favicon_size"
         android:layout_height="match_parent"
         android:layout_marginRight="8dp"
         android:scaleType="centerInside"
         android:duplicateParentState="true"/>
 
     <org.mozilla.gecko.widget.FadedSingleColorTextView
         android:id="@+id/title"
         android:layout_width="0dip"
--- a/mobile/android/base/resources/layout/two_line_page_row.xml
+++ b/mobile/android/base/resources/layout/two_line_page_row.xml
@@ -7,17 +7,17 @@
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:gecko="http://schemas.android.com/apk/res-auto"
        tools:context=".BrowserApp">
 
     <org.mozilla.gecko.widget.FaviconView android:id="@+id/icon"
                                           android:layout_width="@dimen/favicon_bg"
                                           android:layout_height="@dimen/favicon_bg"
                                           android:layout_margin="16dp"
-                                          tools:background="@drawable/favicon"/>
+                                          tools:background="@drawable/favicon_globe"/>
 
     <LinearLayout android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_gravity="center_vertical"
                   android:orientation="vertical"
                   android:paddingRight="25dp">
 
         <org.mozilla.gecko.widget.FadedSingleColorTextView
--- a/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml
+++ b/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml
@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- 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/. -->
 
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
 
     <item android:id="@+id/reload"
-          android:icon="@drawable/ic_menu_reload"
+          android:icon="@drawable/new_tablet_ic_menu_reload"
           android:title="@string/reload"
           android:showAsAction="always"/>
 
     <item android:id="@+id/back"
           android:icon="@drawable/ic_menu_back"
           android:title="@string/back"
           android:visible="false"/>
 
--- a/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml
+++ b/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml
@@ -1,32 +1,32 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- 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/. -->
 
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
 
     <item android:id="@+id/reload"
-          android:icon="@drawable/ic_menu_reload"
+          android:icon="@drawable/new_tablet_ic_menu_reload"
           android:title="@string/reload"
           android:showAsAction="always"/>
 
     <item android:id="@+id/back"
           android:icon="@drawable/ic_menu_back"
           android:title="@string/back"
           android:visible="false"/>
 
     <item android:id="@+id/forward"
           android:icon="@drawable/ic_menu_forward"
           android:title="@string/forward"
           android:visible="false"/>
 
     <item android:id="@+id/bookmark"
-          android:icon="@drawable/ic_menu_bookmark_add"
+          android:icon="@drawable/new_tablet_ic_menu_bookmark_add"
           android:title="@string/bookmark"
           android:showAsAction="always"/>
 
     <item android:id="@+id/share"
           android:icon="@drawable/ic_menu_share"
           android:title="@string/share"
           android:showAsAction="ifRoom"/>
 
--- a/mobile/android/base/resources/values-large-v11/dimens.xml
+++ b/mobile/android/base/resources/values-large-v11/dimens.xml
@@ -2,16 +2,17 @@
 <!-- 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/. -->
 
 <resources>
 
     <dimen name="browser_toolbar_height">56dp</dimen>
     <dimen name="browser_toolbar_button_padding">16dp</dimen>
+    <dimen name="browser_toolbar_favicon_size">16dp</dimen>
 
     <dimen name="tabs_counter_size">26sp</dimen>
     <dimen name="panel_grid_view_column_width">200dp</dimen>
 
     <dimen name="reading_list_row_height">96dp</dimen>
     <dimen name="reading_list_row_padding_right">15dp</dimen>
 
 </resources>
--- a/mobile/android/base/resources/values-large-v11/styles.xml
+++ b/mobile/android/base/resources/values-large-v11/styles.xml
@@ -70,33 +70,20 @@
     <style name="Toast" parent="ToastBase">
         <item name="android:layout_width">400dp</item>
 
         <!-- Same as pre-19 Toast style, but with no left and right margins.
              They're removed since large tablets are never going to be only 400dp wide. -->
     </style>
 
     <style name="Widget.MenuItemActionBar">
-        <item name="android:layout_width">@dimen/browser_toolbar_height</item>
-        <item name="android:layout_height">@dimen/browser_toolbar_height</item>
-        <item name="android:background">@drawable/action_bar_button</item>
-        <item name="android:scaleType">fitCenter</item>
-
-        <!-- We split up padding* because we can't override it in *.NewTablet otherwise. -->
-        <item name="android:paddingTop">@dimen/browser_toolbar_button_padding</item>
-        <item name="android:paddingBottom">@dimen/browser_toolbar_button_padding</item>
-        <item name="android:paddingLeft">@dimen/browser_toolbar_button_padding</item>
-        <item name="android:paddingRight">@dimen/browser_toolbar_button_padding</item>
-    </style>
-
-    <style name="Widget.MenuItemActionBar.NewTablet">
         <item name="android:layout_width">wrap_content</item>
         <item name="android:layout_height">wrap_content</item>
+        <item name="android:background">@drawable/new_tablet_action_bar_button</item>
         <item name="android:scaleType">center</item>
-        <item name="android:background">@drawable/new_tablet_action_bar_button</item>
 
         <!-- layout_width/height doesn't work here, likely because it's
              an ImageButton, so we use padding instead.
 
              Notes:
                  * The bookmarks star is larger than the reload button
                  * The reload button contains whitespace at the top of the image to lower it -->
         <item name="android:paddingTop">19dp</item>
--- a/mobile/android/base/resources/values-large-v11/themes.xml
+++ b/mobile/android/base/resources/values-large-v11/themes.xml
@@ -9,14 +9,13 @@
         Base application theme. This could be overridden by GeckoBaseTheme
         in other res/values-XXX/themes.xml.
     -->
     <style name="GeckoBase" parent="@android:style/Theme.Holo.Light">
         <item name="android:windowContentOverlay">@null</item>
         <item name="android:windowActionBar">false</item>
         <item name="android:windowNoTitle">true</item>
         <item name="arrowPopupWidth">400dp</item>
-        <item name="menuItemActionBarStyleNewTablet">@style/Widget.MenuItemActionBar.NewTablet</item>
     </style>
 
     <style name="GeckoStartPane" parent="Gecko.Dialog"/>
     
 </resources>
--- a/mobile/android/base/resources/values/dimens.xml
+++ b/mobile/android/base/resources/values/dimens.xml
@@ -24,26 +24,24 @@
 
     <!-- This is the system default for the vertical padding for the divider of the TabWidget.
          Used to mimic the divider padding on the tablet tabs panel back button. -->
     <dimen name="new_tablet_tab_panel_divider_vertical_padding">12dp</dimen>
 
     <dimen name="new_tablet_tab_strip_height">48dp</dimen>
     <dimen name="new_tablet_tab_strip_item_width">208dp</dimen>
     <dimen name="new_tablet_tab_strip_item_margin">-28dp</dimen>
-    <dimen name="new_tablet_tab_strip_favicon_size">16dp</dimen>
     <dimen name="new_tablet_tab_strip_fading_edge_size">15dp</dimen>
     <dimen name="new_tablet_site_security_height">60dp</dimen>
     <dimen name="new_tablet_site_security_width">34dp</dimen>
     <!-- We primarily use padding (instead of margins) to increase the hit area. -->
     <dimen name="new_tablet_site_security_padding_vertical">21dp</dimen>
     <dimen name="new_tablet_site_security_padding_horizontal">8dp</dimen>
     <dimen name="new_tablet_site_security_right_margin">1dp</dimen>
     <dimen name="new_tablet_browser_toolbar_height">60dp</dimen>
-    <dimen name="new_tablet_browser_toolbar_menu_right_margin">6dp</dimen>
     <dimen name="new_tablet_browser_toolbar_menu_item_width">56dp</dimen>
     <!-- Padding combines with an 18dp image to form the menu item width and height. -->
     <dimen name="new_tablet_browser_toolbar_menu_item_padding_horizontal">19dp</dimen>
     <dimen name="new_tablet_browser_toolbar_menu_item_inset_vertical">5dp</dimen>
     <dimen name="new_tablet_browser_toolbar_menu_item_inset_horizontal">3dp</dimen>
     <dimen name="new_tablet_browser_toolbar_menu_item_corner_radius">5dp</dimen>
     <dimen name="new_tablet_tab_strip_button_inset">5dp</dimen>
     <dimen name="new_tablet_private_tabs_panel_empty_width">300dp</dimen>
--- a/mobile/android/base/tabs/TabStripItemView.java
+++ b/mobile/android/base/tabs/TabStripItemView.java
@@ -66,17 +66,17 @@ public class TabStripItemView extends Th
 
         final Resources res = context.getResources();
 
         final ColorStateList tabColors =
                 res.getColorStateList(R.color.new_tablet_tab_strip_item_bg);
         backgroundDrawable = new ResizablePathDrawable(new TabCurveShape(), tabColors);
         setBackgroundDrawable(backgroundDrawable);
 
-        faviconSize = res.getDimensionPixelSize(R.dimen.new_tablet_tab_strip_favicon_size);
+        faviconSize = res.getDimensionPixelSize(R.dimen.browser_toolbar_favicon_size);
 
         LayoutInflater.from(context).inflate(R.layout.tab_strip_item_view, this);
         setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
                 if (id < 0) {
                     throw new IllegalStateException("Invalid tab id:" + id);
                 }
@@ -204,17 +204,17 @@ public class TabStripItemView extends Th
             titleView.setText(tab.getDisplayTitle());
         }
 
     }
 
     private void updateFavicon(final Bitmap favicon) {
         if (favicon == null) {
             lastFavicon = null;
-            faviconView.setImageResource(R.drawable.new_tablet_default_favicon);
+            faviconView.setImageResource(R.drawable.toolbar_favicon_default);
             return;
         }
         if (favicon == lastFavicon) {
             return;
         }
 
         // Cache the original so we can debounce without scaling.
         lastFavicon = favicon;
--- a/mobile/android/base/tests/testSettingsMenuItems.java
+++ b/mobile/android/base/tests/testSettingsMenuItems.java
@@ -40,17 +40,17 @@ public class testSettingsMenuItems exten
     String[] PATH_HOME = { StringHelper.CUSTOMIZE_SECTION_LABEL, "Home" };
     String[][] OPTIONS_HOME = {
       { "Panels" },
       { "Automatic updates", "Enabled", "Enabled", "Only over Wi-Fi" },
     };
 
     // Display menu items.
     String[] PATH_DISPLAY = { StringHelper.DISPLAY_SECTION_LABEL };
-    final String[] TITLE_BAR_LABEL_ARR = { StringHelper.TITLE_BAR_LABEL, StringHelper.SHOW_PAGE_TITLE_LABEL,
+    final String[] TITLE_BAR_LABEL_ARR = { StringHelper.TITLE_BAR_LABEL, StringHelper.SHOW_PAGE_ADDRESS_LABEL,
         StringHelper.SHOW_PAGE_TITLE_LABEL, StringHelper.SHOW_PAGE_ADDRESS_LABEL };
     String[][] OPTIONS_DISPLAY = {
         { StringHelper.TEXT_SIZE_LABEL },
         TITLE_BAR_LABEL_ARR,
         { StringHelper.SCROLL_TITLE_BAR_LABEL, "Hide the " + StringHelper.BRAND_NAME + " title bar when scrolling down a page" },
         { "Advanced" },
         { StringHelper.CHARACTER_ENCODING_LABEL, "Don't show menu", "Show menu", "Don't show menu" },
         { StringHelper.PLUGINS_LABEL, "Tap to play", "Enabled", "Tap to play", "Disabled" },
--- a/mobile/android/base/toolbar/BrowserToolbarTablet.java
+++ b/mobile/android/base/toolbar/BrowserToolbarTablet.java
@@ -5,17 +5,16 @@
 
 package org.mozilla.gecko.toolbar;
 
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.animation.PropertyAnimator;
 import org.mozilla.gecko.animation.ViewHelper;
 
 import android.content.Context;
-import android.content.res.Resources;
 import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
 
 /**
  * The toolbar implementation for tablet.
  */
 class BrowserToolbarTablet extends BrowserToolbarTabletBase {
 
@@ -46,26 +45,16 @@ class BrowserToolbarTablet extends Brows
 
         // TODO: Move this to *TabletBase when old tablet is removed.
         // We don't want users clicking the forward button in transitions, but we don't want it to
         // look disabled to avoid flickering complications (e.g. disabled in editing mode), so undo
         // the work of the super class' constructor.
         setButtonEnabled(forwardButton, true);
 
         updateForwardButtonState(ForwardButtonState.HIDDEN);
-
-        setRightMargin();
-    }
-
-    private void setRightMargin() {
-        // TODO: Remove this hack in favor of resources when old tablet is removed.
-        final Resources res = getContext().getResources();
-        final int rightMargin =
-                res.getDimensionPixelOffset(R.dimen.new_tablet_browser_toolbar_menu_right_margin);
-        setPadding(getPaddingLeft(), getPaddingTop(), rightMargin, getPaddingBottom());
     }
 
     private void updateForwardButtonState(final ForwardButtonState state) {
         forwardButtonState = state;
         forwardButton.setEnabled(forwardButtonState == ForwardButtonState.DISPLAYED);
     }
 
     @Override
--- a/mobile/android/base/toolbar/ToolbarDisplayLayout.java
+++ b/mobile/android/base/toolbar/ToolbarDisplayLayout.java
@@ -404,17 +404,17 @@ public class ToolbarDisplayLayout extend
         mLastFavicon = image;
 
         Log.d(LOGTAG, "updateFavicon(" + image + ")");
 
         if (image != null) {
             image = Bitmap.createScaledBitmap(image, mFaviconSize, mFaviconSize, false);
             mFavicon.setImageBitmap(image);
         } else {
-            mFavicon.setImageResource(R.drawable.favicon);
+            mFavicon.setImageResource(R.drawable.favicon_globe);
         }
     }
 
     private void updateSiteIdentity(Tab tab, EnumSet<UpdateFlags> flags) {
         final SiteIdentity siteIdentity;
         if (tab == null) {
             siteIdentity = null;
         } else {
--- a/mobile/android/base/widget/FaviconView.java
+++ b/mobile/android/base/widget/FaviconView.java
@@ -209,17 +209,17 @@ public class FaviconView extends ImageVi
         mIconKey = key;
         mScalingExpected = allowScaling;
 
         // Possibly update the display.
         formatImage();
     }
 
     public void showDefaultFavicon() {
-        setImageResource(R.drawable.favicon);
+        setImageResource(R.drawable.favicon_globe);
         mDominantColor = 0;
     }
 
     private void showNoImage() {
         setImageDrawable(null);
         mDominantColor = 0;
     }
 
--- a/mobile/android/confvars.sh
+++ b/mobile/android/confvars.sh
@@ -71,19 +71,16 @@ if test -z "$MOZ_ANDROID_RESOURCE_CONSTR
 fi
 
 # Mark as WebGL conformant
 MOZ_WEBGL_CONFORMANT=1
 
 # Enable the Search Activity.
 MOZ_ANDROID_SEARCH_ACTIVITY=1
 
-# Use the new tablet UI. This will go away in Bug 1106935.
-MOZ_ANDROID_NEW_TABLET_UI=1
-
 # Enable the share handler.
 MOZ_ANDROID_SHARE_OVERLAY=1
 
 # Enable the Mozilla Location Service stumbler.
 MOZ_ANDROID_MLS_STUMBLER=1
 
 # Enable adding to the system downloads list in pre-release builds.
 MOZ_ANDROID_DOWNLOADS_INTEGRATION=1
--- a/toolkit/components/social/SocialService.jsm
+++ b/toolkit/components/social/SocialService.jsm
@@ -544,25 +544,23 @@ this.SocialService = {
     }
     return data;
   },
 
   _showInstallNotification: function(data, aAddonInstaller) {
     let brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties");
     let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
 
-
-    // foreign activation uses the activation url for origin, directory or
-    // internal (in-product) activations use the origin defined in the manifest
-    let url = data.installType == "foreign" ?
-            data.url :
-            data.installType == "directory" ||
-            data.installType == "internal" ?
-              data.manifest.origin : undefined;
-    let requestingURI = Services.io.newURI(url, null, null);
+    // internal/directory activations need to use the manifest origin, any other
+    // use the domain activation is occurring on
+    let url = data.url;
+    if (data.installType == "internal" || data.installType == "directory") {
+      url = data.manifest.origin;
+    }
+    let requestingURI =  Services.io.newURI(url, null, null);
     let productName = brandBundle.GetStringFromName("brandShortName");
 
     let message = browserBundle.formatStringFromName("service.install.description",
                                                      [requestingURI.host, productName], 2);
 
     let action = {
       label: browserBundle.GetStringFromName("service.install.ok.label"),
       accessKey: browserBundle.GetStringFromName("service.install.ok.accesskey"),