Backed out 3 changesets (bug 857165, bug 863828) for Android bustage on a CLOSED TREE.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 26 Apr 2013 22:49:55 -0400
changeset 141079 1421ddeb0348eca08d849a14266ef90c781e51a9
parent 141078 4ad22d42b4f56b49959f6114f3da0fdfcd58152a
child 141080 e3126e00ec9184c4d53217e0963e20bdcdcceff4
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs857165, 863828
milestone23.0a1
backs out4ad22d42b4f56b49959f6114f3da0fdfcd58152a
84b4d799cc6dadba5455385da7ced60b7056065e
cc161ca434fab1f50c3a766d5ae33080cfbcf3d0
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
Backed out 3 changesets (bug 857165, bug 863828) for Android bustage on a CLOSED TREE. Backed out changeset 4ad22d42b4f5 (bug 863828) Backed out changeset 84b4d799cc6d (bug 857165) Backed out changeset cc161ca434fa (bug 863828)
mobile/android/base/BrowserToolbar.java
mobile/android/base/Makefile.in
mobile/android/base/Rotate3DAnimation.java
mobile/android/base/Tab.java
mobile/android/base/TabCounter.java
mobile/android/base/resources/drawable-hdpi/tabs_count.png
mobile/android/base/resources/drawable-hdpi/tabs_count_foreground.png
mobile/android/base/resources/drawable-mdpi/tabs_count_foreground.png
mobile/android/base/resources/drawable-xhdpi/tabs_count.png
mobile/android/base/resources/drawable-xhdpi/tabs_count_foreground.png
mobile/android/base/resources/layout/browser_toolbar.xml
mobile/android/base/resources/layout/tabs_counter.xml
mobile/android/base/resources/values/colors.xml
mobile/android/base/resources/values/styles.xml
mobile/android/chrome/content/browser.js
--- a/mobile/android/base/BrowserToolbar.java
+++ b/mobile/android/base/BrowserToolbar.java
@@ -2,66 +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;
 
 import org.mozilla.gecko.gfx.ImmutableViewportMetrics;
 import org.mozilla.gecko.gfx.LayerView;
-import org.mozilla.gecko.util.StringUtils;
 import org.mozilla.gecko.util.HardwareUtils;
 
 import org.mozilla.gecko.util.ThreadUtils;
 import org.mozilla.gecko.util.UiAsyncTask;
 
 import android.content.Context;
 import android.content.SharedPreferences;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
-import android.graphics.Color;
 import android.graphics.Rect;
 import android.graphics.drawable.AnimationDrawable;
 import android.graphics.drawable.ColorDrawable;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.StateListDrawable;
 import android.os.Build;
 import android.os.Handler;
 import android.os.SystemClock;
-import android.text.style.ForegroundColorSpan;
-import android.text.Spannable;
-import android.text.SpannableStringBuilder;
 import android.text.TextUtils;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.view.ContextMenu;
+import android.view.LayoutInflater;
 import android.view.MenuInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewGroup.MarginLayoutParams;
 import android.view.Window;
 import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.animation.AlphaAnimation;
 import android.view.animation.Animation;
-import android.view.animation.AlphaAnimation;
 import android.view.animation.TranslateAnimation;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.Button;
 import android.widget.ImageButton;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.PopupWindow;
 import android.widget.RelativeLayout;
 import android.widget.RelativeLayout.LayoutParams;
 import android.widget.ViewSwitcher;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-public class BrowserToolbar implements Tabs.OnTabsChangedListener,
+public class BrowserToolbar implements ViewSwitcher.ViewFactory,
+                                       Tabs.OnTabsChangedListener,
                                        GeckoMenu.ActionItemBarPresenter,
                                        Animation.AnimationListener,
                                        SharedPreferences.OnSharedPreferenceChangeListener {
     private static final String LOGTAG = "GeckoToolbar";
     public static final String PREFS_NAME = "BrowserToolbar";
     public static final String PREFS_SHOW_URL = "ShowUrl";
     private GeckoRelativeLayout mLayout;
     private LayoutParams mAwesomeBarParams;
@@ -77,59 +74,65 @@ public class BrowserToolbar implements T
     private int mTabsPaneWidth;
     private ImageButton mBack;
     private ImageButton mForward;
     public ImageButton mFavicon;
     public ImageButton mStop;
     public ImageButton mSiteSecurity;
     public ImageButton mReader;
     private AnimationDrawable mProgressSpinner;
-    private TabCounter mTabsCounter;
+    private GeckoTextSwitcher mTabsCount;
     private ImageView mShadow;
     private GeckoImageButton mMenu;
     private LinearLayout mActionItemBar;
     private MenuPopup mMenuPopup;
     private List<View> mFocusOrder;
 
     final private BrowserApp mActivity;
+    private LayoutInflater mInflater;
     private Handler mHandler;
     private boolean mHasSoftMenuButton;
 
     private boolean mShowSiteSecurity;
     private boolean mShowReader;
 
     private static List<View> sActionItems;
 
     private boolean mAnimatingEntry;
 
+    private int mDuration;
+    private TranslateAnimation mSlideUpIn;
+    private TranslateAnimation mSlideUpOut;
+    private TranslateAnimation mSlideDownIn;
+    private TranslateAnimation mSlideDownOut;
+
     private AlphaAnimation mLockFadeIn;
     private TranslateAnimation mTitleSlideLeft;
     private TranslateAnimation mTitleSlideRight;
 
     private int mAddressBarViewOffset;
     private int mDefaultForwardMargin;
     private PropertyAnimator mForwardAnim = null;
 
+    private int mCount;
     private int mFaviconSize;
 
     private PropertyAnimator mVisibilityAnimator;
 
     private static final int TABS_CONTRACTED = 1;
     private static final int TABS_EXPANDED = 2;
 
     private static final int FORWARD_ANIMATION_DURATION = 450;
-    private final ForegroundColorSpan mUrlColor;
-    private final ForegroundColorSpan mDomainColor;
-    private final ForegroundColorSpan mPrivateDomainColor;
 
     private boolean mShowUrl;
 
     public BrowserToolbar(BrowserApp activity) {
         // BrowserToolbar is attached to BrowserApp only.
         mActivity = activity;
+        mInflater = LayoutInflater.from(activity);
 
         sActionItems = new ArrayList<View>();
         Tabs.registerOnTabsChangedListener(this);
         mAnimateSiteSecurity = true;
 
         mAnimatingEntry = false;
         mShowUrl = false;
 
@@ -139,28 +142,24 @@ public class BrowserToolbar implements T
                 SharedPreferences settings = mActivity.getSharedPreferences(PREFS_NAME, 0);
                 settings.registerOnSharedPreferenceChangeListener(BrowserToolbar.this);
                 mShowUrl = settings.getBoolean(PREFS_SHOW_URL, false);
                 return null;
             }
 
             @Override
             public void onPostExecute(Void v) {
-                Tab tab = Tabs.getInstance().getSelectedTab();
-                if (tab != null) {
-                    setTitle(tab.getDisplayTitle());
+                if (mShowUrl) {
+                    Tab tab = Tabs.getInstance().getSelectedTab();
+                    if (tab != null) {
+                        setTitle(tab.getURL());
+                    }
                 }
             }
         }).execute();
-
-        Resources res = mActivity.getResources();
-        mUrlColor = new ForegroundColorSpan(res.getColor(R.color.url_bar_urltext));
-        mDomainColor = new ForegroundColorSpan(res.getColor(R.color.url_bar_domaintext_private));
-        mPrivateDomainColor = new ForegroundColorSpan(res.getColor(R.color.url_bar_domaintext));
-
     }
 
     public void from(RelativeLayout layout) {
         if (mLayout != null) {
             // make sure we retain the visibility property on rotation
             layout.setVisibility(mLayout.getVisibility());
         }
 
@@ -235,17 +234,33 @@ public class BrowserToolbar implements T
         mTabs.setOnClickListener(new Button.OnClickListener() {
             @Override
             public void onClick(View v) {
                 toggleTabs();
             }
         });
         mTabs.setImageLevel(0);
 
-        mTabsCounter = (TabCounter) mLayout.findViewById(R.id.tabs_count);
+        mTabsCount = (GeckoTextSwitcher) mLayout.findViewById(R.id.tabs_count);
+        mTabsCount.removeAllViews();
+        mTabsCount.setFactory(this);
+        mTabsCount.setText("");
+        mCount = 0;
+        if (Build.VERSION.SDK_INT >= 16) {
+            // This adds the TextSwitcher to the a11y node tree, where we in turn
+            // could make it return an empty info node. If we don't do this the
+            // TextSwitcher's child TextViews get picked up, and we don't want
+            // that since the tabs ImageButton is already properly labeled for
+            // accessibility.
+            mTabsCount.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
+            mTabsCount.setAccessibilityDelegate(new View.AccessibilityDelegate() {
+                    @Override
+                    public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {}
+                });
+        }
 
         mBack = (ImageButton) mLayout.findViewById(R.id.back);
         mBack.setOnClickListener(new Button.OnClickListener() {
             @Override
             public void onClick(View view) {
                 Tabs.getInstance().getSelectedTab().doBack();
             }
         });
@@ -334,16 +349,26 @@ public class BrowserToolbar implements T
         mShadow = (ImageView) mLayout.findViewById(R.id.shadow);
         mShadow.setOnClickListener(new Button.OnClickListener() {
             @Override
             public void onClick(View v) {
             }
         });
 
         mHandler = new Handler();
+        mSlideUpIn = new TranslateAnimation(0, 0, 40, 0);
+        mSlideUpOut = new TranslateAnimation(0, 0, 0, -40);
+        mSlideDownIn = new TranslateAnimation(0, 0, -40, 0);
+        mSlideDownOut = new TranslateAnimation(0, 0, 0, 40);
+
+        mDuration = 750;
+        mSlideUpIn.setDuration(mDuration);
+        mSlideUpOut.setDuration(mDuration);
+        mSlideDownIn.setDuration(mDuration);
+        mSlideDownOut.setDuration(mDuration);
 
         float slideWidth = mActivity.getResources().getDimension(R.dimen.browser_toolbar_lock_width);
 
         LinearLayout.LayoutParams siteSecParams = (LinearLayout.LayoutParams) mSiteSecurity.getLayoutParams();
         final float scale = mActivity.getResources().getDisplayMetrics().density;
         slideWidth += (siteSecParams.leftMargin + siteSecParams.rightMargin) * scale + 0.5f;
 
         mLockFadeIn = new AlphaAnimation(0.0f, 1.0f);
@@ -431,17 +456,17 @@ public class BrowserToolbar implements T
             mAwesomeBarRightEdge.requestLayout();
     }
 
     @Override
     public void onTabChanged(Tab tab, Tabs.TabEvents msg, Object data) {
         switch(msg) {
             case TITLE:
                 if (Tabs.getInstance().isSelectedTab(tab)) {
-                    setTitle(tab.getDisplayTitle());
+                    setTitle(mShowUrl ? tab.getURL() : tab.getDisplayTitle());
                 }
                 break;
             case START:
                 if (Tabs.getInstance().isSelectedTab(tab)) {
                     updateBackButton(tab.canDoBack());
                     updateForwardButton(tab.canDoForward());
                     Boolean showProgress = (Boolean)data;
                     if (showProgress && tab.getState() == Tab.STATE_LOADING)
@@ -451,17 +476,17 @@ public class BrowserToolbar implements T
                 }
                 break;
             case STOP:
                 if (Tabs.getInstance().isSelectedTab(tab)) {
                     updateBackButton(tab.canDoBack());
                     updateForwardButton(tab.canDoForward());
                     setProgressVisibility(false);
                     // Reset the title in case we haven't navigated to a new page yet.
-                    setTitle(tab.getDisplayTitle());
+                    setTitle(mShowUrl ? tab.getURL() : tab.getDisplayTitle());
                 }
                 break;
             case RESTORED:
                 updateTabCount(Tabs.getInstance().getDisplayCount());
                 break;
             case SELECTED:
                 mAnimateSiteSecurity = false;
                 // fall through
@@ -537,16 +562,22 @@ public class BrowserToolbar implements T
 
     @Override
     public void onAnimationEnd(Animation animation) {
         if (animation.equals(mTitleSlideRight)) {
             mSiteSecurity.startAnimation(mLockFadeIn);
         }
     }
 
+    @Override
+    public View makeView() {
+        // This returns a TextView for the TextSwitcher.
+        return mInflater.inflate(R.layout.tabs_counter, null);
+    }
+
     private int getAwesomeBarAnimTranslation() {
         return mLayout.getWidth() - mAwesomeBarEntry.getRight();
     }
 
     public void fromAwesomeBarSearch(String url) {
         // Update the title with the url that was just entered. Don't update the title if
         // the AwesomeBar activity was cancelled, or if the user entered an empty string.
         if (url != null && url.length() > 0) {
@@ -569,17 +600,17 @@ public class BrowserToolbar implements T
             mLayout.setSelected(true);
 
             final int translation = getAwesomeBarAnimTranslation();
 
             proxy = AnimatorProxy.create(mAwesomeBarRightEdge);
             proxy.setTranslationX(translation);
             proxy = AnimatorProxy.create(mTabs);
             proxy.setTranslationX(translation);
-            proxy = AnimatorProxy.create(mTabsCounter);
+            proxy = AnimatorProxy.create(mTabsCount);
             proxy.setTranslationX(translation);
             proxy = AnimatorProxy.create(mActionItemBar);
             proxy.setTranslationX(translation);
 
             if (mHasSoftMenuButton) {
                 proxy = AnimatorProxy.create(mMenu);
                 proxy.setTranslationX(translation);
             }
@@ -604,17 +635,17 @@ public class BrowserToolbar implements T
 
         // Shrink the awesome entry back to its original size
         contentAnimator.attach(mAwesomeBarRightEdge,
                                PropertyAnimator.Property.TRANSLATION_X,
                                0);
         contentAnimator.attach(mTabs,
                                PropertyAnimator.Property.TRANSLATION_X,
                                0);
-        contentAnimator.attach(mTabsCounter,
+        contentAnimator.attach(mTabsCount,
                                PropertyAnimator.Property.TRANSLATION_X,
                                0);
         contentAnimator.attach(mActionItemBar,
                                PropertyAnimator.Property.TRANSLATION_X,
                                0);
 
         if (mHasSoftMenuButton)
             contentAnimator.attach(mMenu,
@@ -705,17 +736,17 @@ public class BrowserToolbar implements T
 
         // Slide the right side elements of the toolbar
         contentAnimator.attach(mAwesomeBarRightEdge,
                                PropertyAnimator.Property.TRANSLATION_X,
                                translation);
         contentAnimator.attach(mTabs,
                                PropertyAnimator.Property.TRANSLATION_X,
                                translation);
-        contentAnimator.attach(mTabsCounter,
+        contentAnimator.attach(mTabsCount,
                                PropertyAnimator.Property.TRANSLATION_X,
                                translation);
         contentAnimator.attach(mActionItemBar,
                                PropertyAnimator.Property.TRANSLATION_X,
                                translation);
 
         if (mHasSoftMenuButton)
             contentAnimator.attach(mMenu,
@@ -767,42 +798,53 @@ public class BrowserToolbar implements T
 
     public void updateTabCountAndAnimate(int count) {
         // Don't animate if the toolbar is hidden.
         if (!isVisible()) {
             updateTabCount(count);
             return;
         }
 
-        mTabsCounter.setCount(count, true);
+        if (mCount > count) {
+            mTabsCount.setInAnimation(mSlideDownIn);
+            mTabsCount.setOutAnimation(mSlideDownOut);
+        } else if (mCount < count) {
+            mTabsCount.setInAnimation(mSlideUpIn);
+            mTabsCount.setOutAnimation(mSlideUpOut);
+        } else {
+            return;
+        }
 
+        mTabsCount.setText(String.valueOf(count));
         mTabs.setContentDescription((count > 1) ?
                                     mActivity.getString(R.string.num_tabs, count) :
                                     mActivity.getString(R.string.one_tab));
+        mCount = count;
     }
 
     public void updateTabCount(int count) {
-        mTabsCounter.setCount(count, false);
+        mTabsCount.setCurrentText(String.valueOf(count));
         mTabs.setContentDescription((count > 1) ?
                                     mActivity.getString(R.string.num_tabs, count) :
                                     mActivity.getString(R.string.one_tab));
+        mCount = count;
         updateTabs(mActivity.areTabsShown());
     }
 
     public void prepareTabsAnimation(PropertyAnimator animator, int width) {
         animator.attach(mAwesomeBarEntry,
                         PropertyAnimator.Property.TRANSLATION_X,
                         width);
         animator.attach(mAddressBarBg,
                         PropertyAnimator.Property.TRANSLATION_X,
                         width);
         animator.attach(mTabs,
                         PropertyAnimator.Property.TRANSLATION_X,
                         width);
-        animator.attach(mTabsCounter,
+        animator.attach(mTabsCount,
                         PropertyAnimator.Property.TRANSLATION_X,
                         width);
         animator.attach(mBack,
                         PropertyAnimator.Property.TRANSLATION_X,
                         width);
         animator.attach(mForward,
                         PropertyAnimator.Property.TRANSLATION_X,
                         width);
@@ -828,17 +870,17 @@ public class BrowserToolbar implements T
             setPageActionVisibility(mStop.getVisibility() == View.VISIBLE);
     }
 
     public void adjustTabsAnimation(boolean reset) {
         int width = reset ? 0 : mTabsPaneWidth;
         mAwesomeBarEntry.setTranslationX(width);
         mAddressBarBg.setTranslationX(width);
         mTabs.setTranslationX(width);
-        mTabsCounter.setTranslationX(width);
+        mTabsCount.setTranslationX(width);
         mBack.setTranslationX(width);
         mForward.setTranslationX(width);
         mTitle.setTranslationX(width);
         mFavicon.setTranslationX(width);
         mSiteSecurity.setTranslationX(width);
 
         ((ViewGroup.MarginLayoutParams) mLayout.getLayoutParams()).leftMargin = reset ? mTabsPaneWidth : 0;
     }
@@ -972,52 +1014,31 @@ public class BrowserToolbar implements T
         visible &= !(url == null || (url.startsWith("about:") && 
                      !url.equals("about:blank")));
 
         if ((mShadow.getVisibility() == View.VISIBLE) != visible) {
             mShadow.setVisibility(visible ? View.VISIBLE : View.GONE);
         }
     }
 
-    private void setTitle(String title) {
+    private void setTitle(CharSequence title) {
         Tab tab = Tabs.getInstance().getSelectedTab();
-        CharSequence displayTitle = title;
 
         // Keep the title unchanged if the tab is entering reader mode
         if (tab != null && tab.isEnteringReaderMode())
             return;
 
         // Setting a null title will ensure we just see the "Enter Search or Address"
         // placeholder text. Because "about:home" and "about:privatebrowsing" don't
         // have titles, their display titles will always match their URLs.
         if (tab != null && ("about:home".equals(title) ||
-                            "about:privatebrowsing".equals(title))) {
-            displayTitle = null;
-        }
-
-        if (mShowUrl && displayTitle != null) {
-            title = StringUtils.stripScheme(tab.getURL());
-            title = StringUtils.stripCommonSubdomains(title);
-            displayTitle = title;
+                            "about:privatebrowsing".equals(title)))
+            title = null;
 
-            // highlight the domain name if we find one
-            String baseDomain = tab.getBaseDomain();
-            if (!TextUtils.isEmpty(baseDomain)) {
-                SpannableStringBuilder builder = new SpannableStringBuilder(title);
-                int index = title.indexOf(baseDomain);
-                if (index > -1) {
-                    builder.setSpan(mUrlColor, 0, title.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
-                    builder.setSpan(tab.isPrivate() ? mPrivateDomainColor : mDomainColor, index, index+baseDomain.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
-
-                    displayTitle = builder;
-                }
-            }
-        }
-
-        mTitle.setText(displayTitle);
+        mTitle.setText(title);
         mLayout.setContentDescription(title != null ? title : mTitle.getHint());
     }
 
     private void setFavicon(Bitmap image) {
         if (Tabs.getInstance().getSelectedTab().getState() == Tab.STATE_LOADING)
             return;
 
         if (image != null) {
@@ -1192,38 +1213,37 @@ public class BrowserToolbar implements T
     public void hide() {
         mLayout.setVisibility(View.GONE);
     }
 
     public void refresh() {
         Tab tab = Tabs.getInstance().getSelectedTab();
         if (tab != null) {
             String url = tab.getURL();
-            setTitle(tab.getDisplayTitle());
+            setTitle(mShowUrl ? tab.getURL() : tab.getDisplayTitle());
             setFavicon(tab.getFavicon());
             setProgressVisibility(tab.getState() == Tab.STATE_LOADING);
             setSecurityMode(tab.getSecurityMode());
             setReaderMode(tab.getReaderEnabled());
             setShadowVisibility(true);
             updateTabCount(Tabs.getInstance().getDisplayCount());
             updateBackButton(tab.canDoBack());
             updateForwardButton(tab.canDoForward());
 
-            final boolean isPrivate = tab.isPrivate();
-            mAddressBarBg.setPrivateMode(isPrivate);
-            mLayout.setPrivateMode(isPrivate);
-            mTabs.setPrivateMode(isPrivate);
-            mTitle.setPrivateMode(isPrivate);
-            mMenu.setPrivateMode(isPrivate);
+            mAddressBarBg.setPrivateMode(tab.isPrivate());
+            mLayout.setPrivateMode(tab.isPrivate());
+            mTabs.setPrivateMode(tab.isPrivate());
+            mTitle.setPrivateMode(tab.isPrivate());
+            mMenu.setPrivateMode(tab.isPrivate());
 
             if (mBack instanceof BackButton)
-                ((BackButton) mBack).setPrivateMode(isPrivate);
+                ((BackButton) mBack).setPrivateMode(tab.isPrivate());
 
             if (mForward instanceof ForwardButton)
-                ((ForwardButton) mForward).setPrivateMode(isPrivate);
+                ((ForwardButton) mForward).setPrivateMode(tab.isPrivate());
         }
     }
 
     public void onDestroy() {
         Tabs.unregisterOnTabsChangedListener(this);
     }
 
     public boolean openOptionsMenu() {
@@ -1247,13 +1267,13 @@ public class BrowserToolbar implements T
         return true;
     }
 
     public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
         if (key.equals(PREFS_SHOW_URL)) {
             mShowUrl = sharedPreferences.getBoolean(key, false);
             Tab tab = Tabs.getInstance().getSelectedTab();
             if (tab != null) {
-                setTitle(tab.getDisplayTitle());
+                setTitle(mShowUrl ? tab.getURL() : tab.getDisplayTitle());
             }
         }
     }
 }
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -138,27 +138,25 @@ FENNEC_JAVA_FILES = \
   Restarter.java \
   sqlite/ByteBufferInputStream.java \
   sqlite/MatrixBlobCursor.java \
   sqlite/SQLiteBridge.java \
   sqlite/SQLiteBridgeException.java \
   ReaderModeUtils.java \
   RemoteTabs.java \
   RobocopAPI.java \
-  Rotate3DAnimation.java \
   ServiceNotificationClient.java \
   SessionParser.java \
   SetupScreen.java \
   ShapedButton.java \
   SiteIdentityPopup.java \
   SmsManager.java \
   SuggestClient.java \
   SurfaceBits.java \
   Tab.java \
-  TabCounter.java \
   Tabs.java \
   TabsPanel.java \
   TabsTray.java \
   TabsAccessor.java \
   TailTouchDelegate.java \
   Telemetry.java \
   TextSelection.java \
   TextSelectionHandle.java \
@@ -596,17 +594,16 @@ RES_DRAWABLE_MDPI = \
   res/drawable-mdpi/spinner_focused.9.png \
   res/drawable-mdpi/spinner_pressed.9.png \
   res/drawable-mdpi/tab_new.png \
   res/drawable-mdpi/tab_new_pb.png \
   res/drawable-mdpi/tab_close.png \
   res/drawable-mdpi/tab_thumbnail_default.png \
   res/drawable-mdpi/tab_thumbnail_shadow.png \
   res/drawable-mdpi/tabs_count.png \
-  res/drawable-mdpi/tabs_count_foreground.png \
   res/drawable-mdpi/address_bar_url_default.9.png \
   res/drawable-mdpi/address_bar_url_default_pb.9.png \
   res/drawable-mdpi/address_bar_url_pressed.9.png \
   res/drawable-mdpi/address_bar_url_pressed_pb.9.png \
   res/drawable-mdpi/doorhanger_popup_bg.9.png \
   res/drawable-mdpi/find_close.png \
   res/drawable-mdpi/find_next.png \
   res/drawable-mdpi/find_prev.png \
@@ -695,17 +692,16 @@ RES_DRAWABLE_HDPI = \
   res/drawable-hdpi/spinner_focused.9.png \
   res/drawable-hdpi/spinner_pressed.9.png \
   res/drawable-hdpi/tab_new.png \
   res/drawable-hdpi/tab_new_pb.png \
   res/drawable-hdpi/tab_close.png \
   res/drawable-hdpi/tab_thumbnail_default.png \
   res/drawable-hdpi/tab_thumbnail_shadow.png \
   res/drawable-hdpi/tabs_count.png \
-  res/drawable-hdpi/tabs_count_foreground.png \
   res/drawable-hdpi/address_bar_url_default.9.png \
   res/drawable-hdpi/address_bar_url_default_pb.9.png \
   res/drawable-hdpi/address_bar_url_pressed.9.png \
   res/drawable-hdpi/address_bar_url_pressed_pb.9.png \
   res/drawable-hdpi/doorhanger_popup_bg.9.png \
   res/drawable-hdpi/find_close.png \
   res/drawable-hdpi/find_next.png \
   res/drawable-hdpi/find_prev.png \
@@ -783,17 +779,16 @@ RES_DRAWABLE_XHDPI = \
   res/drawable-xhdpi/spinner_focused.9.png \
   res/drawable-xhdpi/spinner_pressed.9.png \
   res/drawable-xhdpi/tab_new.png \
   res/drawable-xhdpi/tab_new_pb.png \
   res/drawable-xhdpi/tab_close.png \
   res/drawable-xhdpi/tab_thumbnail_default.png \
   res/drawable-xhdpi/tab_thumbnail_shadow.png \
   res/drawable-xhdpi/tabs_count.png \
-  res/drawable-xhdpi/tabs_count_foreground.png \
   res/drawable-xhdpi/doorhanger_popup_bg.9.png \
   res/drawable-xhdpi/find_close.png \
   res/drawable-xhdpi/find_next.png \
   res/drawable-xhdpi/find_prev.png \
   res/drawable-xhdpi/urlbar_stop.png \
   res/drawable-xhdpi/reader.png \
   res/drawable-xhdpi/reader_active.png \
   res/drawable-xhdpi/reading_list.png \
deleted file mode 100644
--- a/mobile/android/base/Rotate3DAnimation.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.mozilla.gecko;
-
-import android.view.animation.Animation;
-import android.view.animation.Transformation;
-
-import android.graphics.Camera;
-import android.graphics.Matrix;
-
-/**
- * An animation that rotates the view on the Y axis between two specified angles.
- * This animation also adds a translation on the Z axis (depth) to improve the effect.
- */
-public class Rotate3DAnimation extends Animation {
-    private final float mFromDegrees;
-    private final float mToDegrees;
-
-    private final float mCenterX;
-    private final float mCenterY;
-
-    private final float mDepthZ;
-    private final boolean mReverse;
-    private Camera mCamera;
-
-    private int mWidth = 1;
-    private int mHeight = 1;
-
-    /**
-     * Creates a new 3D rotation on the Y axis. The rotation is defined by its
-     * start angle and its end angle. Both angles are in degrees. The rotation
-     * is performed around a center point on the 2D space, definied by a pair
-     * of X and Y coordinates, called centerX and centerY. When the animation
-     * starts, a translation on the Z axis (depth) is performed. The length
-     * of the translation can be specified, as well as whether the translation
-     * should be reversed in time.
-     *
-     * @param fromDegrees the start angle of the 3D rotation
-     * @param toDegrees the end angle of the 3D rotation
-     * @param centerX the X center of the 3D rotation
-     * @param centerY the Y center of the 3D rotation
-     * @param reverse true if the translation should be reversed, false otherwise
-     */
-    public Rotate3DAnimation(float fromDegrees, float toDegrees,
-            float centerX, float centerY, float depthZ, boolean reverse) {
-        mFromDegrees = fromDegrees;
-        mToDegrees = toDegrees;
-        mCenterX = centerX;
-        mCenterY = centerY;
-        mDepthZ = depthZ;
-        mReverse = reverse;
-    }
-
-   @Override
-    public void initialize(int width, int height, int parentWidth, int parentHeight) {
-        super.initialize(width, height, parentWidth, parentHeight);
-        mCamera = new Camera();
-        mWidth = width;
-        mHeight = height;
-    }
-
-    @Override
-    protected void applyTransformation(float interpolatedTime, Transformation t) {
-        final float fromDegrees = mFromDegrees;
-        float degrees = fromDegrees + ((mToDegrees - fromDegrees) * interpolatedTime);
-
-        final Camera camera = mCamera;
-        final Matrix matrix = t.getMatrix();
-
-        camera.save();
-        if (mReverse) {
-            camera.translate(0.0f, 0.0f, mDepthZ * interpolatedTime);
-        } else {
-            camera.translate(0.0f, 0.0f, mDepthZ * (1.0f - interpolatedTime));
-        }
-        camera.rotateX(degrees);
-        camera.getMatrix(matrix);
-        camera.restore();
-
-        matrix.preTranslate(-mCenterX * mWidth, -mCenterY * mHeight);
-        matrix.postTranslate(mCenterX * mWidth, mCenterY * mHeight);
-    }
-}
--- a/mobile/android/base/Tab.java
+++ b/mobile/android/base/Tab.java
@@ -31,17 +31,16 @@ import java.util.regex.Pattern;
 
 public class Tab {
     private static final String LOGTAG = "GeckoTab";
 
     private static Pattern sColorPattern;
     private final int mId;
     private long mLastUsed;
     private String mUrl;
-    private String mBaseDomain;
     private String mUserSearch;
     private String mTitle;
     private Bitmap mFavicon;
     private String mFaviconUrl;
     private int mFaviconSize;
     private boolean mFeedsEnabled;
     private JSONObject mIdentityData;
     private boolean mReaderEnabled;
@@ -73,17 +72,16 @@ public class Tab {
     public static final int STATE_SUCCESS = 2;
     public static final int STATE_ERROR = 3;
 
     public Tab(Context context, int id, String url, boolean external, int parentId, String title) {
         mContext = context;
         mId = id;
         mLastUsed = 0;
         mUrl = url;
-        mBaseDomain = "";
         mUserSearch = "";
         mExternal = external;
         mParentId = parentId;
         mTitle = title == null ? "" : title;
         mFavicon = null;
         mFaviconUrl = null;
         mFaviconSize = 0;
         mFeedsEnabled = false;
@@ -151,20 +149,16 @@ public class Tab {
     public String getDisplayTitle() {
         if (mTitle != null && mTitle.length() > 0) {
             return mTitle;
         }
 
         return mUrl;
     }
 
-    public String getBaseDomain() {
-        return mBaseDomain;
-    }
-
     public Bitmap getFavicon() {
         return mFavicon;
     }
 
     public Drawable getThumbnail() {
         return mThumbnail;
     }
 
@@ -567,17 +561,16 @@ public class Tab {
 
     void handleLocationChange(JSONObject message) throws JSONException {
         final String uri = message.getString("uri");
         mEnteringReaderMode = ReaderModeUtils.isEnteringReaderMode(mUrl, uri);
         updateURL(uri);
         updateUserSearch(message.getString("userSearch"));
 
         setDocumentURI(message.getString("documentURI"));
-        mBaseDomain = message.optString("baseDomain");
         if (message.getBoolean("sameDocument")) {
             // We can get a location change event for the same document with an anchor tag
             // Notify listeners so that buttons like back or forward will update themselves
             Tabs.getInstance().notifyListeners(this, Tabs.TabEvents.LOCATION_CHANGE, uri);
             return;
         }
 
         setContentType(message.getString("contentType"));
deleted file mode 100644
--- a/mobile/android/base/TabCounter.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- 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;
-
-import android.content.Context;
-import android.os.Build;
-import android.view.accessibility.AccessibilityNodeInfo;
-import android.view.animation.Animation;
-import android.view.animation.AnimationSet;
-import android.view.animation.AlphaAnimation;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.util.AttributeSet;
-import android.widget.ViewSwitcher;
-
-public class TabCounter extends GeckoTextSwitcher
-                        implements ViewSwitcher.ViewFactory {
-
-    private static final float CENTER_X = 0.5f;
-    private static final float CENTER_Y = 1.25f;
-    private static final int DURATION = 500;
-    private static final float Z_DISTANCE = 200;
-
-    private final AnimationSet mFlipInForward;
-    private final AnimationSet mFlipInBackward;
-    private final AnimationSet mFlipOutForward;
-    private final AnimationSet mFlipOutBackward;
-    private final LayoutInflater mInflater;
-
-    private int mCount = 0;
-
-    private enum FadeMode {
-        FADE_IN,
-        FADE_OUT
-    }
-
-    public TabCounter(Context context, AttributeSet attrs) {
-        super(context, attrs);
-        mInflater = LayoutInflater.from(context);
-
-        mFlipInForward = createAnimation(-90, 0, FadeMode.FADE_IN, -1 * Z_DISTANCE, false);
-        mFlipInBackward = createAnimation(90, 0, FadeMode.FADE_IN, Z_DISTANCE, false);
-        mFlipOutForward = createAnimation(0, -90, FadeMode.FADE_OUT, -1 * Z_DISTANCE, true);
-        mFlipOutBackward = createAnimation(0, 90, FadeMode.FADE_OUT, Z_DISTANCE, true);
-
-        removeAllViews();
-        setFactory(this);
-        setCount(0, false);
-
-        if (Build.VERSION.SDK_INT >= 16) {
-            // This adds the TextSwitcher to the a11y node tree, where we in turn
-            // could make it return an empty info node. If we don't do this the
-            // TextSwitcher's child TextViews get picked up, and we don't want
-            // that since the tabs ImageButton is already properly labeled for
-            // accessibility.
-            setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
-            setAccessibilityDelegate(new View.AccessibilityDelegate() {
-                    @Override
-                    public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {}
-                });
-        }
-    }
-
-    public void setCount(int count, boolean doAnimation) {
-        if (!doAnimation) {
-            setInAnimation(null);
-            setOutAnimation(null);
-        } else {
-            if (mCount > count) {
-                setInAnimation(mFlipInBackward);
-                setOutAnimation(mFlipOutForward);
-            } else if (mCount < count) {
-                setInAnimation(mFlipInForward);
-                setOutAnimation(mFlipOutBackward);
-            } else {
-                return;
-            }
-        }
-
-        setText(String.valueOf(count));
-        mCount = count;
-    }
-
-    private AnimationSet createAnimation(float startAngle, float endAngle,
-                                         FadeMode fadeMode,
-                                         float zEnd, boolean reverse) {
-        final Context context = getContext();
-        AnimationSet set = new AnimationSet(context, null);
-        set.addAnimation(new Rotate3DAnimation(startAngle, endAngle, CENTER_X, CENTER_Y, zEnd, reverse));
-        set.addAnimation(fadeMode == FadeMode.FADE_IN ? new AlphaAnimation(0.0f, 1.0f) :
-                                                        new AlphaAnimation(1.0f, 0.0f));
-        set.setDuration(DURATION);
-        set.setInterpolator(context, android.R.anim.accelerate_interpolator);
-        return set;
-    }
-
-    @Override
-    public View makeView() {
-        return mInflater.inflate(R.layout.tabs_counter, null);
-    }
-
-}
index f81e047e34ae3d97d477ff030a106e879b60cce0..c81712cec96ae28ce1eeea8e240ebf5aa4222e2f
GIT binary patch
literal 1235
zc$}S7U1%It6rOfV6H2p2(W0^9by}^3?9NYiXJ^Jtva>U@&0;rAHw!NK;Lgt6WQJsZ
zGIQf@f)7U8LPSMDp+0B}ZG$f@M1)cVr6e>hh~yzsQHfMa$b--~MJcX#;%<~u^5A98
z+<VTP@0@eb&&-buAM4uJvyUK%uELO7!u#QfI``uD9pda+ygh}q3L5psP+booA)8(e
zf`X%u!xGfZnW<Z_pCDqEU9O-?@wjMsPEwC_k`2cvqSZgx@O5JXB2a_lwkwhMzWka5
zwkeUXq>FUXSD<AN%?5CEcDQWJP8fno4i13+hKLO~5b2=dOuC`ikjO2&B0fiAiUeCK
zXhI_Y393>Y0g4wukWTg`44Pp8$0eCmn&X&Wz|ss$(fHvKOiE01BAWrNMPhG(IVP6W
ze9IT+B+^327b&V<uP5t$NiP_u7(oys8!Vf^8i{bmMS3IQhKJe~R2Uk8?IYWBLB#7d
zZyHG?*}j6~7mM45-LRD?oHDAR`xKL;DaWDO+94{zv7NQU@{A9u5)8fRz`*qwJM<q{
zJ3}Ky9F2G)uyIlJN!2r^9q6KhDv|h0(zH!6&u8)slS$DTmgabd;c31vpJN4CP&Ah9
zW7;+zhRw-oT1gACOlK5^(O6!|<Yg@<YbvkiXf4ym7Tgf&t^wOv`(LcEBUV%bs3R{Z
zd){Qb14b+ld7<U`KpEx0i$&eA-AHgWDo`s{7}&2vGaq;k*vhbIKO_QL;OPf%t}-mo
zXL7tIC^@o)HUCf6C>#v+K)bX>xCf)-cJpIqdwigaXC}bI5np|2KSAu;RZ!(}<A>V)
zW^-_<y8E3AadJuiDf?^Jaz5Kjl$5zY&b`@qw%a>$TLvp1#uoXHr1jYH)%lY*Pu=)^
zVa~{AKd7AUwcbz;|JDx%x|W-pAD>xOhKTuMeWe<9v(2Bgci98vcbAAo=D;KG$FkQp
zW8LRszg*7Vf8w>yJG<9{{jo2ed~{E3+<I^0g%$aD>h0&ItZx^tX%~s5>l<JW(*mY5
zCp+F1tu^^Vyyu(vpThSCk#qi;Q|sAR<I@*!RHs&tfls-|A4?~GyxqJtwc61mZc0L2
zJfU=aa%4q5zkdDY9)9EbwaL%(gP)~4=dM1T5(iRu5ANx%68BCIEbdkQ`YQU(6trRW
IO0N3W-??m;qyPW_
deleted file mode 100644
index 8b20b5eb3cd56eb7d6c135522cc08c1f37b1bb42..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index b3c15996628758c4f490087502864e47b3a43398..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
index 74eef827b1a74854637437ff9e34ef63efb063b5..763d0eec4dd4011a05c0a7337d3f491738263c77
GIT binary patch
literal 1319
zc%17D@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC$r9IylHmNblJdl&R0hYC{G?O`
z&)mfH)S%SFl*+=BsWuD@%o&*>5hW46K32*3xq68pHF_1f1q>iyV_#8_n4FzjqL7rD
zo|$K>^nUk#C56lsTcvPQUjyF)=hTc$kE){7;3~h6<f`ms%M>MhI|Z8xE1&_nsU?XD
z6}dTi#a0!zN?>!XfNYSkzLEl1NlCV?62wsvz5xo(`9-M;rh3M@$p(go3T9?{h9;(F
zW`;TnMh1pP`UXH`rfX<oWol++WUc@ON<iC+Qqrt~T-=~`0eQAc86_nJR{Hwo<>h+i
z#(Mch>H3D2mX;thjEr=FDs+o0^GXscbn}XpVJ5hw7AF^F7L;V>=P7{riAnjTCALaR
zFfZg5`1-;P&MSrn6fns2D-sLz4fPE4b941!s*6j4Qq%COE)J<INYxKYEzU13N(RP9
znlh4A__cx*0$pR}Uz7=ql*AmD{N&Qy)VvZ;7h5Huj9yA+ij|v%xtpP(xru?fk%5_o
zp`nF=g|VBHk)@-hv#XJju_4S1Y<gYY94#G<jh!3~%$*GlU5zZ9&D|Vbog7_VEL@xn
zT+Ly6J@bl767!N%VR|zWdL8lVwQ?>>O)SYT3dzsUfu(?ejQo=P;*9(P1?ONh1r6WC
z<jg#ffF>w{pl(eq$}CGwaVyHtRRD*uRVEe}7+6{up!?j#(8$8V+{wb#(%DG~syBt4
zP}2uGMjtJ?z=VKl5X6Khejo>)eNyv)d8P=MIbvfOe=smGhI+a<hE&{oGwWd1AqRmr
zb61ffqXqM7IDRt(dGP--*ysD=p!o+zmkj}|@(X@(IoYmYKiV9``gs42IH$|bGUdib
z%=Z&NZuoq3X6&37M+?_j9Pdt&d&A20zvfx9z@8>84Z-)dY}y8l$`e*j+dD;WMKd3V
zj_nCKiQuUd@+~W6^QYJfMES+Jw{BvW>inuM(ZD=iZJp}1+7G8+O8Cw*+v)r7<@?4h
z8I9X4*UCx$njPP~a;N&Y5GJ!p`==J&y}%;)W1)uPeaEF!&fa}e{I2o9oxnA-cN~me
za4dF#ihYKQ0}C9@i+OM)HsN4w!U`k5uFpyzcy}e7TR7*^F|FX{IZl-#7FK7zdnj%w
z(b%v=V1}j0j6jYTj<1h7ezM;D{Vr3L*B{1hVw0~|yT0n@+**Eoc9m^LZTR)V`SWIo
v%3s)^9c&h_mAdEM$#`C%MHR<g8yFe5kJ@(bjEve1D!M#f{an^LB{Ts5XC1|T
deleted file mode 100644
index bad3253310d1e4c3c7350a81803a359e147261ce..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/mobile/android/base/resources/layout/browser_toolbar.xml
+++ b/mobile/android/base/resources/layout/browser_toolbar.xml
@@ -3,18 +3,16 @@
    - 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/. -->
 
 <org.mozilla.gecko.BrowserToolbarLayout xmlns:android="http://schemas.android.com/apk/res/android"
               xmlns:gecko="http://schemas.android.com/apk/res-auto"
               android:id="@+id/browser_toolbar"
               style="@style/BrowserToolbar"
               android:layout_centerVertical="true"
-              android:clipChildren="false"
-              android:clipToPadding="false"
               android:clickable="true"
               android:focusable="true">
 
     <ImageButton android:id="@+id/back"
                  style="@style/AddressBar.ImageButton.Back"/>
 
     <ImageButton android:id="@+id/forward"
                  style="@style/AddressBar.ImageButton.Forward"/>
@@ -77,24 +75,25 @@
                         android:paddingRight="11dip"/>
 
     <!-- The TextSwitcher should be shifted 24dp on the left, to avoid
          the curve. On a 48dp space, centering 24dp image will leave
          12dp on all sides. However this image has a perception of
          2 layers. Hence to center this, an additional 4dp is added to the left.
          The margins will be 40dp on left, 8dp on right, instead of ideal 30dp
          and 12dp. -->
-    <org.mozilla.gecko.TabCounter android:id="@+id/tabs_counter"
-                        style="@style/AddressBar.ImageButton.TabCount"
+    <Gecko.TextSwitcher android:id="@+id/tabs_count"
+                        style="@style/AddressBar.ImageButton"
                         android:layout_width="24dip"
                         android:layout_height="24dip"
                         android:layout_marginLeft="40dip"
                         android:layout_marginRight="8dip"
                         android:layout_marginTop="12dip"
-                        android:layout_alignRight="@id/tabs"/>
+                        android:layout_alignRight="@id/tabs"
+                        android:gravity="center_horizontal"/>
 
     <LinearLayout android:id="@+id/awesome_bar_content"
                   style="@style/AddressBar.Button"
                   android:layout_toLeftOf="@id/tabs"
                   android:layout_marginRight="-24dp"
                   android:orientation="horizontal">
 
         <ImageButton android:id="@+id/favicon"
--- a/mobile/android/base/resources/layout/tabs_counter.xml
+++ b/mobile/android/base/resources/layout/tabs_counter.xml
@@ -4,14 +4,14 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <Gecko.TextView xmlns:android="http://schemas.android.com/apk/res/android"
                 android:layout_width="24dip"
                 android:layout_height="24dip"
                 android:layout_margin="12dip"
                 android:paddingTop="2dip"
                 android:paddingLeft="4dip"
-                android:background="@drawable/tabs_count_foreground"
+                android:background="@drawable/tabs_count"
                 android:textAppearance="@style/TextAppearance.Micro"
                 android:textColor="#FF43484E"
                 android:textStyle="bold"
                 android:duplicateParentState="true"
                 android:gravity="center"/>
--- a/mobile/android/base/resources/values/colors.xml
+++ b/mobile/android/base/resources/values/colors.xml
@@ -78,14 +78,10 @@
   <color name="abouthome_topsite_pin">#55000000</color>
   <color name="dialogtitle_textcolor">#ffffff</color>
 
   <color name="textbox_background">#FFF</color>
   <color name="textbox_background_disabled">#DDD</color>
   <color name="textbox_stroke">#000</color>
   <color name="textbox_stroke_disabled">#666</color>
 
-  <color name="url_bar_urltext">#A6A6A6</color>
-  <color name="url_bar_domaintext">#000</color>
-  <color name="url_bar_domaintext_private">#FFF</color>
-
 </resources>
 
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -156,23 +156,16 @@
 
     <!-- BrowserToolbar -->
     <style name="BrowserToolbar">
         <item name="android:layout_width">fill_parent</item>
         <item name="android:layout_height">@dimen/browser_toolbar_height</item>
         <item name="android:orientation">horizontal</item>
     </style>
 
-    <style name="AddressBar.ImageButton.TabCount">
-        <item name="android:background">@drawable/tabs_count</item>
-        <item name="android:gravity">center_horizontal</item>
-        <item name="android:clipChildren">false</item>
-        <item name="android:clipToPadding">false</item>
-    </style>
-
     <!-- Address bar -->
     <style name="AddressBar">
         <item name="android:layout_width">fill_parent</item>
         <item name="android:layout_height">fill_parent</item>
         <item name="android:orientation">horizontal</item>
     </style>
 
     <!-- Address bar - Button -->
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -3382,40 +3382,23 @@ Tab.prototype = {
                        ((this.browser.lastURI != null) && fixedURI.equals(this.browser.lastURI) && !fixedURI.equals(aLocationURI));
     this.browser.lastURI = fixedURI;
 
     // Reset state of click-to-play plugin notifications.
     clearTimeout(this.pluginDoorhangerTimeout);
     this.pluginDoorhangerTimeout = null;
     this.shouldShowPluginDoorhanger = true;
     this.clickToPlayPluginsActivated = false;
-    // Borrowed from desktop Firefox: http://mxr.mozilla.org/mozilla-central/source/browser/base/content/urlbarBindings.xml#174
-    let matchedURL = documentURI.match(/^((?:[a-z]+:\/\/)?(?:[^\/]+@)?)(.+?)(?::\d+)?(?:\/|$)/);
-    let baseDomain = "";
-    if (matchedURL) {
-      var domain = "";
-      [, , domain] = matchedURL;
-
-      try {
-        baseDomain = Services.eTLD.getBaseDomainFromHost(domain);
-        if (!domain.endsWith(baseDomain)) {
-          // getBaseDomainFromHost converts its resultant to ACE.
-          let IDNService = Cc["@mozilla.org/network/idn-service;1"].getService(Ci.nsIIDNService);
-          baseDomain = IDNService.convertACEtoUTF8(baseDomain);
-        }
-      } catch (e) {}
-    }
 
     let message = {
       type: "Content:LocationChange",
       tabID: this.id,
       uri: fixedURI.spec,
       userSearch: this.userSearch || "",
       documentURI: documentURI,
-      baseDomain: baseDomain,
       contentType: (contentType ? contentType : ""),
       sameDocument: sameDocument
     };
 
     sendMessageToJava(message);
 
     // The search term is only valid for this location change event, so reset it here.
     this.userSearch = "";