Bug 858687/862755/860308 - Major simplification of browser toolbar layout (r=mfinkle)
☠☠ backed out by 93259cd4c674 ☠ ☠
authorLucas Rocha <lucasr@mozilla.com>
Thu, 14 Mar 2013 15:35:38 -0700
changeset 140798 e0f70c5a5f095431d0911551a0a1bb3b44e61d68
parent 140797 ed39a9db0fb190df0f0d9130f9e970cd0fdecb3f
child 140799 039a1de069ed16479c73c22c037209d3bb303573
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)
reviewersmfinkle
bugs858687, 862755, 860308
milestone23.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
Bug 858687/862755/860308 - Major simplification of browser toolbar layout (r=mfinkle) * * * Bug fi
mobile/android/base/BrowserApp.java
mobile/android/base/BrowserToolbar.java
mobile/android/base/BrowserToolbarBackground.java
mobile/android/base/BrowserToolbarLayout.java
mobile/android/base/GeckoViewsFactory.java
mobile/android/base/Makefile.in
mobile/android/base/resources/drawable/address_bar_right_edge.xml
mobile/android/base/resources/layout-large-v11/browser_toolbar_menu.xml
mobile/android/base/resources/layout/browser_toolbar.xml
mobile/android/base/resources/layout/browser_toolbar_menu.xml
mobile/android/base/resources/values-large-v11/dimens.xml
mobile/android/base/resources/values-large-v11/styles.xml
mobile/android/base/resources/values/dimens.xml
mobile/android/base/resources/values/styles.xml
mobile/android/base/tests/BaseTest.java.in
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -337,17 +337,17 @@ abstract public class BrowserApp extends
     }
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
         mAboutHomeStartupTimer = new Telemetry.Timer("FENNEC_STARTUP_TIME_ABOUTHOME");
 
         super.onCreate(savedInstanceState);
 
-        LinearLayout actionBar = (LinearLayout) getActionBarLayout();
+        RelativeLayout actionBar = (RelativeLayout) getActionBarLayout();
         mMainLayout.addView(actionBar, 2);
 
         ((GeckoApp.MainLayout) mMainLayout).setTouchEventInterceptor(new HideTabsTouchListener());
         ((GeckoApp.MainLayout) mMainLayout).setMotionEventInterceptor(new MotionEventInterceptor() {
             @Override
             public boolean onInterceptMotionEvent(View view, MotionEvent event) {
                 // If we get a gamepad panning MotionEvent while the focus is not on the layerview,
                 // put the focus on the layerview and carry on
@@ -678,26 +678,19 @@ abstract public class BrowserApp extends
             }
         }
 
         // We always need to call fromAwesomeBarSearch to perform the toolbar animation.
         mBrowserToolbar.fromAwesomeBarSearch(url);
     }
 
     public View getActionBarLayout() {
-        int actionBarRes;
-
-        if (!HardwareUtils.hasMenuButton() || HardwareUtils.isTablet())
-           actionBarRes = R.layout.browser_toolbar_menu;
-        else
-           actionBarRes = R.layout.browser_toolbar;
-
-        LinearLayout actionBar = (LinearLayout) LayoutInflater.from(this).inflate(actionBarRes, null);
-        actionBar.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,
-                                                                (int) getResources().getDimension(R.dimen.browser_toolbar_height)));
+        RelativeLayout actionBar = (RelativeLayout) LayoutInflater.from(this).inflate(R.layout.browser_toolbar_menu, null);
+        actionBar.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT,
+                                                                  (int) getResources().getDimension(R.dimen.browser_toolbar_height)));
         return actionBar;
     }
 
     @Override
     public boolean hasTabsSideBar() {
         return (mTabsPanel != null && mTabsPanel.isSideBar());
     }
 
--- a/mobile/android/base/BrowserToolbar.java
+++ b/mobile/android/base/BrowserToolbar.java
@@ -35,38 +35,35 @@ import android.view.animation.AlphaAnima
 import android.view.animation.Animation;
 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 ViewSwitcher.ViewFactory,
                                        Tabs.OnTabsChangedListener,
                                        GeckoMenu.ActionItemBarPresenter,
                                        Animation.AnimationListener {
     private static final String LOGTAG = "GeckoToolbar";
-    private LinearLayout mLayout;
-    private View mAwesomeBar;
+    private GeckoRelativeLayout mLayout;
     private LayoutParams mAwesomeBarParams;
+    private View mAwesomeBarContent;
     private View mAwesomeBarEntry;
-    private int mAwesomeBarEntryRightMargin;
-    private GeckoFrameLayout mAwesomeBarRightEdge;
+    private ImageView mAwesomeBarRightEdge;
     private BrowserToolbarBackground mAddressBarBg;
-    private View mAddressBarView;
-    private BrowserToolbarBackground.CurveTowards mAddressBarBgCurveTowards;
-    private int mAddressBarBgRightMargin;
     private GeckoTextView mTitle;
     private int mTitlePadding;
     private boolean mSiteSecurityVisible;
     private boolean mAnimateSiteSecurity;
     private ShapedButton mTabs;
     private int mTabsPaneWidth;
     private ImageButton mBack;
     private ImageButton mForward;
@@ -100,17 +97,16 @@ public class BrowserToolbar implements V
     private TranslateAnimation mSlideDownIn;
     private TranslateAnimation mSlideDownOut;
 
     private AlphaAnimation mLockFadeIn;
     private TranslateAnimation mTitleSlideLeft;
     private TranslateAnimation mTitleSlideRight;
 
     private int mAddressBarViewOffset;
-    private int mAddressBarViewOffsetNoForward;
     private int mDefaultForwardMargin;
     private PropertyAnimator mForwardAnim = null;
 
     private int mCount;
     private int mFaviconSize;
 
     private PropertyAnimator mVisibilityAnimator;
 
@@ -126,59 +122,33 @@ public class BrowserToolbar implements V
 
         sActionItems = new ArrayList<View>();
         Tabs.registerOnTabsChangedListener(this);
         mAnimateSiteSecurity = true;
 
         mAnimatingEntry = false;
     }
 
-    public void from(LinearLayout layout) {
+    public void from(RelativeLayout layout) {
         if (mLayout != null) {
             // make sure we retain the visibility property on rotation
             layout.setVisibility(mLayout.getVisibility());
         }
-        mLayout = layout;
-        mLayout.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-            }
-        });
-
-        mShowSiteSecurity = false;
-        mShowReader = false;
-
-        mAnimatingEntry = false;
 
-        mAddressBarBg = (BrowserToolbarBackground) mLayout.findViewById(R.id.address_bar_bg);
-        mAddressBarView = mLayout.findViewById(R.id.addressbar);
-        mAddressBarViewOffset = mActivity.getResources().getDimensionPixelSize(R.dimen.addressbar_offset_left);
-        mAddressBarViewOffsetNoForward = mActivity.getResources().getDimensionPixelSize(R.dimen.addressbar_offset_left_noforward);
-        mDefaultForwardMargin = mActivity.getResources().getDimensionPixelSize(R.dimen.forward_default_offset);
-        mAwesomeBarRightEdge = (GeckoFrameLayout) mLayout.findViewById(R.id.awesome_bar_right_edge);
-        mAwesomeBarEntry = mLayout.findViewById(R.id.awesome_bar_entry);
+        mLayout = (GeckoRelativeLayout) layout;
 
-        // This will hold the translation width inside the toolbar when the tabs
-        // pane is visible. It will affect the padding applied to the title TextView.
-        mTabsPaneWidth = 0;
-
-        mTitle = (GeckoTextView) mLayout.findViewById(R.id.awesome_bar_title);
-        mTitlePadding = mTitle.getPaddingRight();
-        if (Build.VERSION.SDK_INT >= 16)
-            mTitle.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
-
-        mAwesomeBar = mLayout.findViewById(R.id.awesome_bar);
-        mAwesomeBar.setOnClickListener(new Button.OnClickListener() {
+        mLayout.setOnClickListener(new Button.OnClickListener() {
             @Override
             public void onClick(View v) {
                 mActivity.autoHideTabs();
                 onAwesomeBarSearch();
             }
         });
-        mAwesomeBar.setOnCreateContextMenuListener(new View.OnCreateContextMenuListener() {
+
+        mLayout.setOnCreateContextMenuListener(new View.OnCreateContextMenuListener() {
             @Override
             public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
                 MenuInflater inflater = mActivity.getMenuInflater();
                 inflater.inflate(R.menu.titlebar_contextmenu, menu);
 
                 String clipboard = GeckoAppShell.getClipboardText();
                 if (clipboard == null || TextUtils.isEmpty(clipboard)) {
                     menu.findItem(R.id.pasteandgo).setVisible(false);
@@ -201,16 +171,40 @@ public class BrowserToolbar implements V
                     menu.findItem(R.id.copyurl).setVisible(false);
                     menu.findItem(R.id.share).setVisible(false);
                     menu.findItem(R.id.add_to_launcher).setVisible(false);
                     menu.findItem(R.id.subscribe).setVisible(false);
                 }
             }
         });
 
+        mShowSiteSecurity = false;
+        mShowReader = false;
+
+        mAnimatingEntry = false;
+
+        mAddressBarBg = (BrowserToolbarBackground) mLayout.findViewById(R.id.address_bar_bg);
+        mAddressBarViewOffset = mActivity.getResources().getDimensionPixelSize(R.dimen.addressbar_offset_left);
+        mDefaultForwardMargin = mActivity.getResources().getDimensionPixelSize(R.dimen.forward_default_offset);
+        mAwesomeBarContent = mLayout.findViewById(R.id.awesome_bar_content);
+        mAwesomeBarEntry = mLayout.findViewById(R.id.awesome_bar_entry);
+
+        // This will clip the right edge's image at half of its width
+        mAwesomeBarRightEdge = (ImageView) mLayout.findViewById(R.id.awesome_bar_right_edge);
+        mAwesomeBarRightEdge.getDrawable().setLevel(5000);
+
+        // This will hold the translation width inside the toolbar when the tabs
+        // pane is visible. It will affect the padding applied to the title TextView.
+        mTabsPaneWidth = 0;
+
+        mTitle = (GeckoTextView) mLayout.findViewById(R.id.awesome_bar_title);
+        mTitlePadding = mTitle.getPaddingRight();
+        if (Build.VERSION.SDK_INT >= 16)
+            mTitle.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
+
         mTabs = (ShapedButton) mLayout.findViewById(R.id.tabs);
         mTabs.setOnClickListener(new Button.OnClickListener() {
             @Override
             public void onClick(View v) {
                 toggleTabs();
             }
         });
         mTabs.setImageLevel(0);
@@ -318,16 +312,21 @@ public class BrowserToolbar implements V
                     return true;
                 }
 
                 return false;
             }
         });
 
         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;
@@ -376,17 +375,17 @@ public class BrowserToolbar implements V
             mLayout.post(new Runnable() {
                 @Override
                 public void run() {
                     int height = mTabs.getHeight();
                     int width = mTabs.getWidth();
                     int tail = (width - height) / 2;
 
                     Rect bounds = new Rect(0, 0, tail, height);
-                    TailTouchDelegate delegate = new TailTouchDelegate(bounds, mAddressBarView);
+                    TailTouchDelegate delegate = new TailTouchDelegate(bounds, mShadow);
                     mTabs.setTouchDelegate(delegate);
                 }
             });
         }
 
         if (Build.VERSION.SDK_INT >= 11) {
             View panel = mActivity.getMenuPanel();
 
@@ -408,17 +407,17 @@ public class BrowserToolbar implements V
                         public void onDismiss() {
                             mActivity.onOptionsMenuClosed(null);
                         }
                     });
                 }
             }
         }
 
-        mFocusOrder = Arrays.asList(mBack, mForward, mAwesomeBar, mReader, mSiteSecurity, mStop, mTabs);
+        mFocusOrder = Arrays.asList(mBack, mForward, mLayout, mReader, mSiteSecurity, mStop, mTabs);
     }
 
     public View getLayout() {
         return mLayout;
     }
 
     public void refreshBackground() {
         mAddressBarBg.requestLayout();
@@ -494,17 +493,17 @@ public class BrowserToolbar implements V
         }
     }
 
     public boolean isVisible() {
         return mLayout.getScrollY() == 0;
     }
 
     public void setNextFocusDownId(int nextId) {
-        mAwesomeBar.setNextFocusDownId(nextId);
+        mLayout.setNextFocusDownId(nextId);
         mTabs.setNextFocusDownId(nextId);
         mBack.setNextFocusDownId(nextId);
         mForward.setNextFocusDownId(nextId);
         mFavicon.setNextFocusDownId(nextId);
         mStop.setNextFocusDownId(nextId);
         mSiteSecurity.setNextFocusDownId(nextId);
         mReader.setNextFocusDownId(nextId);
         mMenu.setNextFocusDownId(nextId);
@@ -539,62 +538,18 @@ public class BrowserToolbar implements V
     }
 
     @Override
     public View makeView() {
         // This returns a TextView for the TextSwitcher.
         return mInflater.inflate(R.layout.tabs_counter, null);
     }
 
-    private int prepareAwesomeBarAnimation() {
-        // Keep the entry highlighted during the animation
-        mAwesomeBar.setSelected(true);
-
-        // Expand the entry to fill all the horizontal space available during the
-        // animation. The fake right edge will slide on top of it to give the effect
-        // of expanding the entry.
-        MarginLayoutParams entryParams = (MarginLayoutParams) mAwesomeBarEntry.getLayoutParams();
-        mAwesomeBarEntryRightMargin = entryParams.rightMargin;
-        entryParams.rightMargin = 0;
-        mAwesomeBarEntry.requestLayout();
-
-        // Remove any curves from the toolbar background and expand it to fill all
-        // the horizontal space.
-        MarginLayoutParams barParams = (MarginLayoutParams) mAddressBarBg.getLayoutParams();
-        mAddressBarBgRightMargin = barParams.rightMargin;
-        barParams.rightMargin = 0;
-        mAddressBarBgCurveTowards = mAddressBarBg.getCurveTowards();
-        mAddressBarBg.setCurveTowards(BrowserToolbarBackground.CurveTowards.NONE);
-
-        // If we don't have any menu_items, then we simply slide all elements on the
-        // rigth side of the toolbar out of screen.
-        int translation = mAwesomeBarEntryRightMargin;
-
-        if (mActionItemBar.getVisibility() == View.VISIBLE) {
-            // If the toolbar has action items (e.g. on the tablet UI), the translation will
-            // be in relation to the left side of their container (i.e. mActionItemBar).
-            MarginLayoutParams itemBarParams = (MarginLayoutParams) mActionItemBar.getLayoutParams();
-            translation = itemBarParams.rightMargin + mActionItemBar.getWidth() - entryParams.leftMargin;
-
-            // Expand the whole entry container to fill all the horizontal space available
-            View awesomeBarParent = (View) mAwesomeBar.getParent();
-            mAwesomeBarParams = (LayoutParams) awesomeBarParent.getLayoutParams();
-            awesomeBarParent.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
-                                                              ViewGroup.LayoutParams.MATCH_PARENT));
-
-            // Align the fake right edge to the right side of the entry bar
-            MarginLayoutParams rightEdgeParams = (MarginLayoutParams) mAwesomeBarRightEdge.getLayoutParams();
-            rightEdgeParams.rightMargin = itemBarParams.rightMargin + mActionItemBar.getWidth() - 100;
-            mAwesomeBarRightEdge.requestLayout();
-        }
-
-        // Make the right edge visible to start the animation
-        mAwesomeBarRightEdge.setVisibility(View.VISIBLE);
-
-        return translation;
+    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) {
             setTitle(url);
         }
@@ -605,18 +560,21 @@ public class BrowserToolbar implements V
 
         AnimatorProxy proxy = null;
 
         // If the awesomebar entry is not selected at this point, this means that
         // we had to reinflate the toolbar layout for some reason (device rotation
         // while in awesome screen, activity was killed in background, etc). In this
         // case, we have to ensure the toolbar is in the correct initial state to
         // shrink back.
-        if (!mAwesomeBar.isSelected()) {
-            int translation = prepareAwesomeBarAnimation();
+        if (!mLayout.isSelected()) {
+            // Keep the entry highlighted during the animation
+            mLayout.setSelected(true);
+
+            final int translation = getAwesomeBarAnimTranslation();
 
             proxy = AnimatorProxy.create(mAwesomeBarRightEdge);
             proxy.setTranslationX(translation);
             proxy = AnimatorProxy.create(mTabs);
             proxy.setTranslationX(translation);
             proxy = AnimatorProxy.create(mTabsCount);
             proxy.setTranslationX(translation);
             proxy = AnimatorProxy.create(mActionItemBar);
@@ -668,37 +626,17 @@ public class BrowserToolbar implements V
             @Override
             public void onPropertyAnimationStart() {
                 mTabs.setVisibility(View.VISIBLE);
             }
 
             @Override
             public void onPropertyAnimationEnd() {
                 // Turn off selected state on the entry
-                mAwesomeBar.setSelected(false);
-
-                // Restore entry state
-                MarginLayoutParams entryParams = (MarginLayoutParams) mAwesomeBarEntry.getLayoutParams();
-                entryParams.rightMargin = mAwesomeBarEntryRightMargin;
-                mAwesomeBarEntry.requestLayout();
-
-                // Restore the background state
-                MarginLayoutParams barParams = (MarginLayoutParams) mAddressBarBg.getLayoutParams();
-                barParams.rightMargin = mAddressBarBgRightMargin;
-                mAddressBarBg.setCurveTowards(mAddressBarBgCurveTowards);
-
-                // If there are action bar items in the toolbar, we have to restore the
-                // alignment of the entry in relation to them. mAwesomeBarParams might
-                // be null if the activity holding the toolbar is killed before returning
-                // from awesome screen (e.g. "Don't keep activities" is on)
-                if (mActionItemBar.getVisibility() == View.VISIBLE)
-                    ((View) mAwesomeBar.getParent()).setLayoutParams(mAwesomeBarParams);
-
-                // Hide fake right edge, we only use for the animation
-                mAwesomeBarRightEdge.setVisibility(View.INVISIBLE);
+                mLayout.setSelected(false);
 
                 PropertyAnimator buttonsAnimator = new PropertyAnimator(150);
 
                 // Fade toolbar buttons (reader, stop) after the entry
                 // is schrunk back to its original size.
                 buttonsAnimator.attach(mReader,
                                        PropertyAnimator.Property.ALPHA,
                                        1);
@@ -730,17 +668,20 @@ public class BrowserToolbar implements V
         }
 
         if (mAnimatingEntry)
             return;
 
         final PropertyAnimator contentAnimator = new PropertyAnimator(250);
         contentAnimator.setUseHardwareLayer(false);
 
-        int translation = prepareAwesomeBarAnimation();
+        final int translation = getAwesomeBarAnimTranslation();
+
+        // Keep the entry highlighted during the animation
+        mLayout.setSelected(true);
 
         if (mActionItemBar.getVisibility() == View.VISIBLE) {
             contentAnimator.attach(mFavicon,
                                    PropertyAnimator.Property.ALPHA,
                                    0);
             contentAnimator.attach(mSiteSecurity,
                                    PropertyAnimator.Property.ALPHA,
                                    0);
@@ -854,23 +795,17 @@ public class BrowserToolbar implements V
         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) {
-        // This is negative before we want to keep the right edge in the same
-        // position while animating the left-most elements below.
-        animator.attach(mAwesomeBarRightEdge,
-                        PropertyAnimator.Property.TRANSLATION_X,
-                        -width);
-
-        animator.attach(mAwesomeBar,
+        animator.attach(mAwesomeBarEntry,
                         PropertyAnimator.Property.TRANSLATION_X,
                         width);
         animator.attach(mAddressBarBg,
                         PropertyAnimator.Property.TRANSLATION_X,
                         width);
         animator.attach(mTabs,
                         PropertyAnimator.Property.TRANSLATION_X,
                         width);
@@ -902,18 +837,17 @@ public class BrowserToolbar implements V
         // toolbar. Leave the padding update to the end of the animation when
         // expanding (see finishTabsAnimation()).
         if (mTabsPaneWidth > 0)
             setPageActionVisibility(mStop.getVisibility() == View.VISIBLE);
     }
 
     public void adjustTabsAnimation(boolean reset) {
         int width = reset ? 0 : mTabsPaneWidth;
-        mAwesomeBarRightEdge.setTranslationX(-width);
-        mAwesomeBar.setTranslationX(width);
+        mAwesomeBarEntry.setTranslationX(width);
         mAddressBarBg.setTranslationX(width);
         mTabs.setTranslationX(width);
         mTabsCount.setTranslationX(width);
         mBack.setTranslationX(width);
         mForward.setTranslationX(width);
         mTitle.setTranslationX(width);
         mFavicon.setTranslationX(width);
         mSiteSecurity.setTranslationX(width);
@@ -1066,17 +1000,17 @@ public class BrowserToolbar implements V
         // 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)))
             title = null;
 
         mTitle.setText(title);
-        mAwesomeBar.setContentDescription(title != null ? title : mTitle.getHint());
+        mLayout.setContentDescription(title != null ? title : mTitle.getHint());
     }
 
     private void setFavicon(Bitmap image) {
         if (Tabs.getInstance().getSelectedTab().getState() == Tab.STATE_LOADING)
             return;
 
         if (image != null) {
             image = Bitmap.createScaledBitmap(image, mFaviconSize, mFaviconSize, false);
@@ -1102,17 +1036,17 @@ public class BrowserToolbar implements V
     }
 
     private void setReaderMode(boolean showReader) {
         mShowReader = showReader;
         setPageActionVisibility(mStop.getVisibility() == View.VISIBLE);
     }
 
     public void requestFocusFromTouch() {
-        mAwesomeBar.requestFocusFromTouch();
+        mLayout.requestFocusFromTouch();
     }
 
     public void updateBackButton(boolean enabled) {
          Drawable drawable = mBack.getDrawable();
          if (drawable != null)
              drawable.setAlpha(enabled ? 255 : 77);
 
          mBack.setEnabled(enabled);
@@ -1125,108 +1059,107 @@ public class BrowserToolbar implements V
         // Save the state on the forward button so that we can skip animations
         // when there's nothing to change
         mForward.setEnabled(enabled);
 
         if (mForward.getVisibility() != View.VISIBLE)
             return;
 
         mForwardAnim = new PropertyAnimator(FORWARD_ANIMATION_DURATION);
-        final int width = mForward.getWidth()/2;
+        final int width = mForward.getWidth() / 2;
 
         mForwardAnim.setPropertyAnimationListener(new PropertyAnimator.PropertyAnimationListener() {
             @Override
             public void onPropertyAnimationStart() {
                 if (!enabled) {
                     // Set the margin before the transition when hiding the forward button. We
                     // have to do this so that the favicon isn't clipped during the transition
                     ViewGroup.MarginLayoutParams layoutParams =
-                        (ViewGroup.MarginLayoutParams)mAddressBarView.getLayoutParams();
-                    layoutParams.leftMargin = mAddressBarViewOffsetNoForward;
-                    mAddressBarView.requestLayout();
+                        (ViewGroup.MarginLayoutParams)mAwesomeBarContent.getLayoutParams();
+                    layoutParams.leftMargin = 0;
+                    mAwesomeBarContent.requestLayout();
                     // Note, we already translated the favicon, site security, and text field
                     // in prepareForwardAnimation, so they should appear to have not moved at
                     // all at this point.
                 }
             }
 
             @Override
             public void onPropertyAnimationEnd() {
                 if (enabled) {
                     ViewGroup.MarginLayoutParams layoutParams =
-                        (ViewGroup.MarginLayoutParams)mAddressBarView.getLayoutParams();
+                        (ViewGroup.MarginLayoutParams)mAwesomeBarContent.getLayoutParams();
                     layoutParams.leftMargin = mAddressBarViewOffset;
 
                     AnimatorProxy proxy = AnimatorProxy.create(mTitle);
                     proxy.setTranslationX(0);
                     proxy = AnimatorProxy.create(mFavicon);
                     proxy.setTranslationX(0);
                     proxy = AnimatorProxy.create(mSiteSecurity);
                     proxy.setTranslationX(0);
-
                 }
 
                 ViewGroup.MarginLayoutParams layoutParams =
                     (ViewGroup.MarginLayoutParams)mForward.getLayoutParams();
-                layoutParams.leftMargin = mDefaultForwardMargin + (mForward.isEnabled() ? mForward.getWidth()/2 : 0);
+                layoutParams.leftMargin = mDefaultForwardMargin + (mForward.isEnabled() ? mForward.getWidth() / 2 : 0);
                 AnimatorProxy proxy = AnimatorProxy.create(mForward);
                 proxy.setTranslationX(0);
 
-                mAddressBarView.requestLayout();
+                mAwesomeBarContent.requestLayout();
                 mForwardAnim = null;
             }
         });
+
         prepareForwardAnimation(mForwardAnim, enabled, width);
         mForwardAnim.start();
     }
 
     private void prepareForwardAnimation(PropertyAnimator anim, boolean enabled, int width) {
         if (!enabled) {
             anim.attach(mForward,
                       PropertyAnimator.Property.TRANSLATION_X,
-                      -1*width);
+                      -width);
             anim.attach(mForward,
                       PropertyAnimator.Property.ALPHA,
                       0);
             anim.attach(mTitle,
                       PropertyAnimator.Property.TRANSLATION_X,
                       0);
             anim.attach(mFavicon,
                       PropertyAnimator.Property.TRANSLATION_X,
                       0);
             anim.attach(mSiteSecurity,
                       PropertyAnimator.Property.TRANSLATION_X,
                       0);
 
             // We're hiding the forward button. We're going to reset the margin before
             // the animation starts, so we shift these items to the right so that they don't
             // appear to move initially.
-            int startTrans = mAddressBarViewOffset - mAddressBarViewOffsetNoForward;
             AnimatorProxy proxy = AnimatorProxy.create(mTitle);
-            proxy.setTranslationX(startTrans);
+            proxy.setTranslationX(mAddressBarViewOffset);
             proxy = AnimatorProxy.create(mFavicon);
-            proxy.setTranslationX(startTrans);
+            proxy.setTranslationX(mAddressBarViewOffset);
             proxy = AnimatorProxy.create(mSiteSecurity);
-            proxy.setTranslationX(startTrans);
+            proxy.setTranslationX(mAddressBarViewOffset);
         } else {
             anim.attach(mForward,
                       PropertyAnimator.Property.TRANSLATION_X,
                       width);
             anim.attach(mForward,
                       PropertyAnimator.Property.ALPHA,
                       1);
             anim.attach(mTitle,
                       PropertyAnimator.Property.TRANSLATION_X,
-                      mAddressBarViewOffset - mAddressBarViewOffsetNoForward);
+                      mAddressBarViewOffset);
             anim.attach(mFavicon,
                       PropertyAnimator.Property.TRANSLATION_X,
-                      mAddressBarViewOffset - mAddressBarViewOffsetNoForward);
+                      mAddressBarViewOffset);
             anim.attach(mSiteSecurity,
                       PropertyAnimator.Property.TRANSLATION_X,
-                      mAddressBarViewOffset - mAddressBarViewOffsetNoForward);
+                      mAddressBarViewOffset);
         }
     }
 
     @Override
     public void addActionItem(View actionItem) {
         mActionItemBar.addView(actionItem);
 
         if (!sActionItems.contains(actionItem))
@@ -1262,22 +1195,17 @@ public class BrowserToolbar implements V
             setSecurityMode(tab.getSecurityMode());
             setReaderMode(tab.getReaderEnabled());
             setShadowVisibility(true);
             updateTabCount(Tabs.getInstance().getDisplayCount());
             updateBackButton(tab.canDoBack());
             updateForwardButton(tab.canDoForward());
 
             mAddressBarBg.setPrivateMode(tab.isPrivate());
-
-            if (mAwesomeBar instanceof GeckoButton)
-                ((GeckoButton) mAwesomeBar).setPrivateMode(tab.isPrivate());
-            else if (mAwesomeBar instanceof GeckoRelativeLayout)
-                ((GeckoRelativeLayout) mAwesomeBar).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(tab.isPrivate());
 
             if (mForward instanceof ForwardButton)
@@ -1304,48 +1232,9 @@ public class BrowserToolbar implements V
         if (!mHasSoftMenuButton)
             return false;
 
         if (mMenuPopup != null && mMenuPopup.isShowing())
             mMenuPopup.dismiss();
 
         return true;
     }
-
-    public static class RightEdge extends GeckoFrameLayout {
-        private BrowserApp mActivity;
-
-        public RightEdge(Context context, AttributeSet attrs) {
-            super(context, attrs);
-            mActivity = (BrowserApp) context;
-        }
-
-        @Override
-        public void onLightweightThemeChanged() {
-            Drawable drawable = mActivity.getLightweightTheme().getDrawable(this);
-            if (drawable == null)
-                return;
-
-            StateListDrawable stateList = new StateListDrawable();
-            stateList.addState(new int[] { R.attr.state_private }, new ColorDrawable(mActivity.getResources().getColor(R.color.background_private)));
-            stateList.addState(new int[] {}, drawable);
-
-            int[] padding =  new int[] { getPaddingLeft(),
-                                         getPaddingTop(),
-                                         getPaddingRight(),
-                                         getPaddingBottom()
-                                       };
-            setBackgroundDrawable(stateList);
-            setPadding(padding[0], padding[1], padding[2], padding[3]);
-        }
-
-        @Override
-        public void onLightweightThemeReset() {
-            int[] padding =  new int[] { getPaddingLeft(),
-                                         getPaddingTop(),
-                                         getPaddingRight(),
-                                         getPaddingBottom()
-                                       };
-            setBackgroundResource(R.drawable.address_bar_bg);
-            setPadding(padding[0], padding[1], padding[2], padding[3]);
-        }
-    }
 }
--- a/mobile/android/base/BrowserToolbarBackground.java
+++ b/mobile/android/base/BrowserToolbarBackground.java
@@ -9,116 +9,34 @@ import android.content.res.TypedArray;
 import android.graphics.Canvas;
 import android.graphics.Path;
 import android.graphics.PorterDuff.Mode;
 import android.graphics.drawable.ColorDrawable;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.StateListDrawable;
 import android.util.AttributeSet;
 
-public class BrowserToolbarBackground extends GeckoLinearLayout
-                                      implements CanvasDelegate.DrawManager {
+public class BrowserToolbarBackground extends GeckoLinearLayout {
     private GeckoActivity mActivity;
-    private Path mPath;
-    private CurveTowards mSide;
-    private CanvasDelegate mCanvasDelegate;
-
-    public enum CurveTowards { NONE, LEFT, RIGHT };
 
     public BrowserToolbarBackground(Context context, AttributeSet attrs) {
         super(context, attrs);
-
-        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.BrowserToolbarCurve);
-        int curveTowards = a.getInt(R.styleable.BrowserToolbarCurve_curveTowards, 0x02);
-        a.recycle();
-
-        if (curveTowards == 0x00)
-            mSide = CurveTowards.NONE;
-        else if (curveTowards == 0x01)
-            mSide = CurveTowards.LEFT;
-        else
-            mSide = CurveTowards.RIGHT;
-
-        // Path is clipped.
-        mPath = new Path();
-        mCanvasDelegate = new CanvasDelegate(this, Mode.DST_OUT);
         mActivity = (GeckoActivity) context;
     }
 
     @Override
-    public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
-        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
-
-        int width = getMeasuredWidth();
-        int height = getMeasuredHeight();
-        int curve = (int) (height * 1.125f);
-
-        mPath.reset();
-
-        if (mSide == CurveTowards.LEFT) {
-            mPath.moveTo(0, height);
-            mPath.cubicTo(curve * 0.75f, height,
-                          curve * 0.25f, 0,
-                          curve, 0);
-            mPath.lineTo(0, 0);
-            mPath.lineTo(0, height);
-        } else if (mSide == CurveTowards.RIGHT) {
-            mPath.moveTo(width, height);
-            mPath.cubicTo((width - (curve * 0.75f)), height,
-                          (width - (curve * 0.25f)), 0,
-                          (width - curve), 0);
-            mPath.lineTo(width, 0);
-            mPath.lineTo(width, height);
-        }
-    }
-
-    @Override
-    public void draw(Canvas canvas) {
-        mCanvasDelegate.draw(canvas, mPath, getWidth(), getHeight());
-    }
-
-    @Override
-    public void defaultDraw(Canvas canvas) {
-        super.draw(canvas);
-    }
-
-    @Override
     public void onLightweightThemeChanged() {
         Drawable drawable = mActivity.getLightweightTheme().getDrawable(this);
         if (drawable == null)
             return;
 
         StateListDrawable stateList = new StateListDrawable();
         stateList.addState(new int[] { R.attr.state_private }, new ColorDrawable(mActivity.getResources().getColor(R.color.background_private)));
         stateList.addState(new int[] {}, drawable);
 
-        int[] padding =  new int[] { getPaddingLeft(),
-                                     getPaddingTop(),
-                                     getPaddingRight(),
-                                     getPaddingBottom()
-                                   };
         setBackgroundDrawable(stateList);
-        setPadding(padding[0], padding[1], padding[2], padding[3]);
     }
 
     @Override
     public void onLightweightThemeReset() {
-        int[] padding =  new int[] { getPaddingLeft(),
-                                     getPaddingTop(),
-                                     getPaddingRight(),
-                                     getPaddingBottom()
-                                   };
         setBackgroundResource(R.drawable.address_bar_bg);
-        setPadding(padding[0], padding[1], padding[2], padding[3]);
-    }
-
-    public CurveTowards getCurveTowards() {
-        return mSide;
-    }
-
-    public void setCurveTowards(CurveTowards side) {
-        if (side == mSide)
-            return;
-
-        mSide = side;
-        requestLayout();
     }
 }
--- a/mobile/android/base/BrowserToolbarLayout.java
+++ b/mobile/android/base/BrowserToolbarLayout.java
@@ -3,19 +3,19 @@
  * 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.util.AttributeSet;
 import android.view.MotionEvent;
-import android.widget.LinearLayout;
+import android.widget.RelativeLayout;
 
-public class BrowserToolbarLayout extends LinearLayout {
+public class BrowserToolbarLayout extends GeckoRelativeLayout {
     private static final String LOGTAG = "GeckoToolbarLayout";
 
     public BrowserToolbarLayout(Context context, AttributeSet attrs) {
         super(context, attrs);
     }
 
     @Override
     public boolean onTouchEvent(MotionEvent event) {
--- a/mobile/android/base/GeckoViewsFactory.java
+++ b/mobile/android/base/GeckoViewsFactory.java
@@ -51,17 +51,16 @@ public final class GeckoViewsFactory imp
             mFactoryMap.put("LastTabsSection", LastTabsSection.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("PromoBox", PromoBox.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("RemoteTabsSection", RemoteTabsSection.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("TopSitesView", TopSitesView.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("AwesomeBarTabs", AwesomeBarTabs.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("AwesomeBarTabs$BackgroundLayout", AwesomeBarTabs.BackgroundLayout.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("BackButton", BackButton.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("BrowserToolbarBackground", BrowserToolbarBackground.class.getConstructor(arg1Class, arg2Class));
-            mFactoryMap.put("BrowserToolbar$RightEdge", BrowserToolbar.RightEdge.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("CheckableLinearLayout", CheckableLinearLayout.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("FormAssistPopup", FormAssistPopup.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("ForwardButton", ForwardButton.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("GeckoApp$MainLayout", GeckoApp.MainLayout.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("LinkTextView", LinkTextView.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("MenuItemDefault", MenuItemDefault.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("FindInPageBar", FindInPageBar.class.getConstructor(arg1Class, arg2Class));
             mFactoryMap.put("IconTabWidget", IconTabWidget.class.getConstructor(arg1Class, arg2Class));
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -396,17 +396,16 @@ RES_LAYOUT = \
   res/layout/awesomebar_row.xml \
   res/layout/awesomebar_search.xml \
   res/layout/awesomebar_suggestion_row.xml \
   res/layout/awesomebar_suggestion_item.xml \
   res/layout/awesomebar_suggestion_prompt.xml \
   res/layout/awesomebar_tab_indicator.xml \
   res/layout/awesomebar_tabs.xml \
   res/layout/bookmark_edit.xml \
-  res/layout/browser_toolbar.xml \
   res/layout/browser_toolbar_menu.xml \
   res/layout/datetime_picker.xml \
   res/layout/doorhangerpopup.xml \
   res/layout/doorhanger.xml \
   res/layout/doorhanger_button.xml \
   res/layout/find_in_page_content.xml \
   res/layout/font_size_preference.xml \
   res/layout/gecko_app.xml \
@@ -995,16 +994,17 @@ MOZ_ANDROID_DRAWABLES += \
   $(SYNC_RES_DRAWABLE)                                                          \
   mobile/android/base/resources/drawable/abouthome_logo.xml                     \
   mobile/android/base/resources/drawable/abouthome_promo_box.xml                \
   mobile/android/base/resources/drawable/action_bar_button.xml                  \
   mobile/android/base/resources/drawable/action_bar_button_inverse.xml          \
   mobile/android/base/resources/drawable/address_bar_bg.xml                     \
   mobile/android/base/resources/drawable/address_bar_bg_shadow_repeat.xml       \
   mobile/android/base/resources/drawable/address_bar_nav_button.xml             \
+  mobile/android/base/resources/drawable/address_bar_right_edge.xml             \
   mobile/android/base/resources/drawable/address_bar_url.xml                    \
   mobile/android/base/resources/drawable/awesomebar_header_row.xml              \
   mobile/android/base/resources/drawable/awesomebar_row_favicon_bg.xml          \
   mobile/android/base/resources/drawable/awesomebar_tab_indicator.xml           \
   mobile/android/base/resources/drawable/awesomebar_tab_selected.xml            \
   mobile/android/base/resources/drawable/awesomebar_tab_unselected.xml          \
   mobile/android/base/resources/drawable/handle_end_level.xml                   \
   mobile/android/base/resources/drawable/handle_start_level.xml                 \
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/drawable/address_bar_right_edge.xml
@@ -0,0 +1,9 @@
+<?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/. -->
+
+<clip xmlns:android="http://schemas.android.com/apk/res/android"
+      android:drawable="@drawable/address_bar_url"
+      android:clipOrientation="horizontal"
+      android:gravity="right"/>
\ No newline at end of file
--- a/mobile/android/base/resources/layout-large-v11/browser_toolbar_menu.xml
+++ b/mobile/android/base/resources/layout-large-v11/browser_toolbar_menu.xml
@@ -1,181 +1,165 @@
 <?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/. -->
 
 <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">
-
-    <RelativeLayout android:id="@+id/address_bar"
-                    style="@style/AddressBar">
+              style="@style/BrowserToolbar"
+              android:clickable="true"
+              android:focusable="true">
 
-        <org.mozilla.gecko.BrowserToolbarBackground android:id="@+id/address_bar_bg"
-                                                    android:layout_width="fill_parent"
-                                                    android:layout_height="fill_parent"
-                                                    android:layout_marginLeft="21dip"
-                                                    gecko:curveTowards="left"
-                                                    android:background="@drawable/address_bar_bg"/>
+    <org.mozilla.gecko.BrowserToolbarBackground android:id="@+id/address_bar_bg"
+                                                android:layout_width="fill_parent"
+                                                android:layout_height="fill_parent"
+                                                android:background="@drawable/address_bar_bg"/>
 
-        <Gecko.ShapedButton android:id="@+id/tabs"
-                            style="@style/AddressBar.ImageButton"
-                            android:layout_width="84dip"
-                            android:layout_alignParentLeft="true"
-                            gecko:curveTowards="left"
-                            android:background="@drawable/shaped_button"
-                            android:gravity="center_vertical"
-                            android:src="@drawable/tabs_level"
-                            android:paddingLeft="6dip"
-                            android:paddingRight="38dip"/>
+    <Gecko.ShapedButton android:id="@+id/tabs"
+                        style="@style/AddressBar.ImageButton"
+                        android:layout_width="84dip"
+                        android:layout_alignParentLeft="true"
+                        gecko:curveTowards="left"
+                        android:background="@drawable/shaped_button"
+                        android:gravity="center_vertical"
+                        android:src="@drawable/tabs_level"
+                        android:paddingLeft="6dip"
+                        android:paddingRight="38dip"/>
 
-        <Gecko.TextSwitcher android:id="@+id/tabs_count"
-                            style="@style/AddressBar.ImageButton"
-                            android:layout_width="52dip"
-                            android:layout_height="wrap_content"
-                            android:layout_marginTop="8dp"
-                            android:layout_alignLeft="@id/tabs"
-                            android:gravity="center_horizontal"/>
+    <Gecko.TextSwitcher android:id="@+id/tabs_count"
+                        style="@style/AddressBar.ImageButton"
+                        android:layout_width="52dip"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="8dp"
+                        android:layout_alignLeft="@id/tabs"
+                        android:gravity="center_horizontal"/>
+
+    <FrameLayout android:layout_width="fill_parent"
+                 android:layout_height="fill_parent"
+                 android:layout_toRightOf="@id/tabs"
+                 android:layout_toLeftOf="@id/menu_items"
+                 android:layout_marginLeft="-18dp"
+                 android:paddingRight="18dp"
+                 android:layout_marginTop="7dp"
+                 android:layout_marginBottom="7dp"
+                 android:duplicateParentState="true">
 
-        <Gecko.ImageButton android:id="@+id/menu"
-                           style="@style/AddressBar.ImageButton"
-                           android:layout_width="56dip"
-                           android:layout_alignParentRight="true"
-                           android:gravity="center_vertical"
-                           android:src="@drawable/menu_level"
-                           android:contentDescription="@string/menu"
-                           android:background="@drawable/action_bar_button"
-                           android:paddingLeft="14dip"
-                           android:paddingRight="14dip"
-                           android:visibility="gone"/>
+        <ImageView android:id="@+id/awesome_bar_entry"
+                   style="@style/AddressBar.Button"
+                   android:layout_toRightOf="@id/tabs"
+                   android:layout_toLeftOf="@id/menu_items"
+                   android:duplicateParentState="true"
+                   android:clickable="false"
+                   android:focusable="false"
+                   android:src="@drawable/address_bar_url"
+                   android:scaleType="fitXY"/>
 
-        <LinearLayout android:id="@+id/menu_items"
-                      android:layout_width="wrap_content"
-                      android:layout_height="fill_parent"
-                      android:orientation="horizontal"
-                      android:layout_toLeftOf="@id/menu"
-                      android:layout_alignWithParentIfMissing="true"/>
-
-        <RelativeLayout style="@style/AddressBar.Button"
-                        android:layout_toRightOf="@id/tabs"
-                        android:layout_toLeftOf="@id/menu_items"
-                        android:layout_marginLeft="-28dp"
-                        android:layout_alignParentBottom="true"
-                        android:layout_centerVertical="true">
+    </FrameLayout>
 
-            <Gecko.RelativeLayout android:id="@+id/awesome_bar"
-                                  style="@style/AddressBar.Button"
-                                  android:layout_centerVertical="true"
-                                  android:clickable="true"
-                                  android:focusable="true">
+    <ImageView android:id="@+id/awesome_bar_right_edge"
+               style="@style/AddressBar.Button"
+               android:layout_toLeftOf="@id/menu_items"
+               android:layout_marginTop="7dp"
+               android:layout_marginBottom="7dp"
+               android:duplicateParentState="true"
+               android:clickable="false"
+               android:focusable="false"
+               android:src="@drawable/address_bar_right_edge"
+               android:scaleType="fitXY"/>
 
-                <Gecko.ImageView android:id="@+id/awesome_bar_entry"
-                                 style="@style/AddressBar.Button"
-                                 android:layout_marginLeft="20dp"
-                                 android:layout_marginRight="0dp"
-                                 android:layout_marginTop="7dp"
-                                 android:layout_marginBottom="7dp"
-                                 android:duplicateParentState="true"
-                                 android:clickable="false"
-                                 android:focusable="false"
-                                 android:background="@drawable/address_bar_url"/>
+    <org.mozilla.gecko.ForwardButton style="@style/AddressBar.ImageButton.Forward"
+                                     android:id="@+id/forward"
+                                     android:layout_toRightOf="@+id/tabs"/>
 
-                <view class="org.mozilla.gecko.BrowserToolbar$RightEdge"
-                      android:id="@+id/awesome_bar_right_edge"
-                      style="@style/AddressBar.ImageButton"
-                      android:layout_width="25dp"
-                      android:layout_height="fill_parent"
-                      android:paddingTop="7dp"
-                      android:paddingBottom="7dp"
-                      android:layout_centerVertical="true"
-                      android:layout_alignParentRight="true"
-                      android:duplicateParentState="true">
+    <org.mozilla.gecko.BackButton android:id="@+id/back"
+                                  style="@style/AddressBar.ImageButton"
+                                  android:layout_width="50dip"
+                                  android:layout_height="50dip"
+                                  android:layout_toRightOf="@id/tabs"
+                                  android:layout_marginLeft="-28dp"
+                                  android:layout_centerVertical="true"
+                                  android:padding="13dp"
+                                  android:src="@drawable/ic_menu_back"
+                                  android:contentDescription="@string/back"
+                                  android:background="@drawable/address_bar_nav_button"/>
 
-                    <Gecko.ImageView android:layout_width="50dp"
-                                     android:layout_height="fill_parent"
-                                     android:scaleType="fitXY"
-                                     android:layout_marginLeft="-26dp"
-                                     android:duplicateParentState="true"
-                                     android:clickable="false"
-                                     android:focusable="false"
-                                     android:src="@drawable/address_bar_url"/>
+    <LinearLayout android:id="@+id/awesome_bar_content"
+                  style="@style/AddressBar.Button.Container"
+                  android:layout_toRightOf="@id/back"
+                  android:layout_toLeftOf="@id/menu_items">
 
-                </view>
-
-            </Gecko.RelativeLayout>
-
-            <org.mozilla.gecko.ForwardButton style="@style/AddressBar.ImageButton.Forward"
-                                             android:id="@+id/forward"/>
+        <ImageButton android:id="@+id/favicon"
+                     style="@style/AddressBar.ImageButton"
+                     android:layout_width="@dimen/browser_toolbar_favicon_size"
+                     android:layout_height="fill_parent"
+                     android:scaleType="fitCenter"
+                     android:paddingLeft="8dip"
+                     android:layout_marginRight="4dip"
+                     android:layout_gravity="center_vertical"
+                     android:src="@drawable/favicon"/>
 
-            <org.mozilla.gecko.BackButton android:id="@+id/back"
-                                          style="@style/AddressBar.ImageButton"
-                                          android:layout_width="50dip"
-                                          android:layout_height="50dip"
-                                          android:layout_centerVertical="true"
-                                          android:padding="13dp"
-                                          android:src="@drawable/ic_menu_back"
-                                          android:contentDescription="@string/back"
-                                          android:background="@drawable/address_bar_nav_button"/>
+        <ImageButton android:id="@+id/site_security"
+                     style="@style/AddressBar.ImageButton"
+                     android:layout_width="@dimen/browser_toolbar_lock_width"
+                     android:scaleType="fitCenter"
+                     android:layout_marginLeft="-4dip"
+                     android:src="@drawable/site_security_level"
+                     android:contentDescription="@string/site_security"
+                     android:visibility="gone"/>
 
-            <LinearLayout style="@style/AddressBar.Button.Container"
-                          android:id="@+id/addressbar">
-
-                <ImageButton android:id="@+id/favicon"
-                             style="@style/AddressBar.ImageButton"
-                             android:layout_width="@dimen/browser_toolbar_favicon_size"
-                             android:layout_height="fill_parent"
-                             android:scaleType="fitCenter"
-                             android:paddingLeft="8dip"
-                             android:layout_marginRight="4dip"
-                             android:layout_gravity="center_vertical"
-                             android:src="@drawable/favicon"/>
+        <Gecko.TextView android:id="@+id/awesome_bar_title"
+                        style="@style/AddressBar.Button"
+                        android:layout_width="fill_parent"
+                        android:layout_height="fill_parent"
+                        android:layout_weight="1.0"
+                        android:singleLine="true"
+                        android:paddingRight="8dp"
+                        android:textColor="@color/awesome_bar_title"
+                        android:textColorHint="@color/awesome_bar_title_hint"
+                        android:gravity="center_vertical|left"
+                        android:hint="@string/awesomebar_default_text"
+                        android:layout_gravity="center_vertical"
+                        gecko:autoUpdateTheme="false"/>
 
-                <ImageButton android:id="@+id/site_security"
-                             style="@style/AddressBar.ImageButton"
-                             android:layout_width="@dimen/browser_toolbar_lock_width"
-                             android:scaleType="fitCenter"
-                             android:layout_marginLeft="-4dip"
-                             android:src="@drawable/site_security_level"
-                             android:contentDescription="@string/site_security"
-                             android:visibility="gone"/>
+        <ImageButton android:id="@+id/reader"
+                     style="@style/AddressBar.ImageButton.Icon"
+                     android:src="@drawable/reader"
+                     android:contentDescription="@string/reader"
+                     android:visibility="gone"/>
 
-                <Gecko.TextView android:id="@+id/awesome_bar_title"
-                                style="@style/AddressBar.Button"
-                                android:layout_width="fill_parent"
-                                android:layout_height="fill_parent"
-                                android:layout_weight="1.0"
-                                android:singleLine="true"
-                                android:paddingRight="8dp"
-                                android:textColor="@color/awesome_bar_title"
-                                android:textColorHint="@color/awesome_bar_title_hint"
-                                android:gravity="center_vertical|left"
-                                android:hint="@string/awesomebar_default_text"
-                                android:layout_gravity="center_vertical"
-                                gecko:autoUpdateTheme="false"/>
+        <ImageButton android:id="@+id/stop"
+                     style="@style/AddressBar.ImageButton.Icon"
+                     android:src="@drawable/urlbar_stop"
+                     android:contentDescription="@string/stop"
+                     android:visibility="gone"/>
+
+    </LinearLayout>
 
-                <ImageButton android:id="@+id/reader"
-                             style="@style/AddressBar.ImageButton.Icon"
-                             android:src="@drawable/reader"
-                             android:contentDescription="@string/reader"
-                             android:visibility="gone"/>
-
-                <ImageButton android:id="@+id/stop"
-                             style="@style/AddressBar.ImageButton.Icon"
-                             android:src="@drawable/urlbar_stop"
-                             android:contentDescription="@string/stop"
-                             android:visibility="gone"/>
+    <LinearLayout android:id="@+id/menu_items"
+                  android:layout_width="wrap_content"
+                  android:layout_height="fill_parent"
+                  android:layout_marginLeft="3dp"
+                  android:orientation="horizontal"
+                  android:layout_toLeftOf="@id/menu"
+                  android:layout_alignWithParentIfMissing="true"/>
 
-            </LinearLayout>
-
-        </RelativeLayout>
+    <Gecko.ImageButton android:id="@+id/menu"
+                       style="@style/AddressBar.ImageButton"
+                       android:layout_width="56dip"
+                       android:layout_alignParentRight="true"
+                       android:gravity="center_vertical"
+                       android:src="@drawable/menu_level"
+                       android:contentDescription="@string/menu"
+                       android:background="@drawable/action_bar_button"
+                       android:paddingLeft="14dip"
+                       android:paddingRight="14dip"
+                       android:visibility="gone"/>
 
-         <ImageView android:id="@+id/shadow"
-                    android:layout_width="fill_parent"
-                    android:layout_height="2dp"
-                    android:layout_alignParentBottom="true"
-                    android:background="@drawable/address_bar_bg_shadow_repeat"
-                    android:visibility="gone"/>
-
-    </RelativeLayout>
+    <ImageView android:id="@+id/shadow"
+               android:layout_width="fill_parent"
+               android:layout_height="2dp"
+               android:layout_alignParentBottom="true"
+               android:background="@drawable/address_bar_bg_shadow_repeat"
+               android:visibility="gone"/>
 
 </org.mozilla.gecko.BrowserToolbarLayout>
deleted file mode 100644
--- a/mobile/android/base/resources/layout/browser_toolbar.xml
+++ /dev/null
@@ -1,165 +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/. -->
-
-<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">
-
-    <RelativeLayout android:id="@+id/address_bar"
-                    style="@style/AddressBar">
-
-        <ImageButton android:id="@+id/back"
-                     android:contentDescription="@string/back"
-                     style="@style/AddressBar.ImageButton.Unused"/>
-
-        <ImageButton style="@style/AddressBar.ImageButton.Forward"
-                     android:id="@+id/forward"/>
-
-        <org.mozilla.gecko.BrowserToolbarBackground android:id="@+id/address_bar_bg"
-                                                    android:layout_width="fill_parent"
-                                                    android:layout_height="fill_parent"
-                                                    android:layout_marginRight="18dip"
-                                                    android:layout_alignParentTop="true"
-                                                    android:layout_alignParentRight="true"
-                                                    gecko:curveTowards="right"
-                                                    android:background="@drawable/address_bar_bg"/>
-
-        <FrameLayout style="@style/AddressBar.Button.Container"
-                     android:id="@+id/addressbar">
-
-            <Gecko.RelativeLayout android:id="@+id/awesome_bar"
-                                  style="@style/AddressBar.Button"
-                                  android:layout_centerVertical="true"
-                                  android:clickable="true"
-                                  android:focusable="true">
-
-                <ImageView android:id="@+id/awesome_bar_entry"
-                           style="@style/AddressBar.Button"
-                           android:duplicateParentState="true"
-                           android:layout_marginTop="5dp"
-                           android:layout_marginBottom="5dp"
-                           android:layout_marginRight="52dp"
-                           android:clickable="false"
-                           android:focusable="false"
-                           android:background="@drawable/address_bar_url"/>
-
-                <view class="org.mozilla.gecko.BrowserToolbar$RightEdge"
-                      android:id="@+id/awesome_bar_right_edge"
-                      style="@style/AddressBar.ImageButton"
-                      android:layout_width="50dp"
-                      android:layout_height="fill_parent"
-                      android:paddingTop="5dp"
-                      android:paddingBottom="5dp"
-                      android:layout_centerVertical="true"
-                      android:layout_alignParentRight="true"
-                      android:layout_marginRight="27dp"
-                      android:duplicateParentState="true"
-                      android:visibility="invisible"
-                      android:background="@drawable/address_bar_bg">
-
-                    <ImageView android:layout_width="50dp"
-                               android:layout_height="fill_parent"
-                               android:scaleType="fitXY"
-                               android:layout_marginLeft="-26dp"
-                               android:duplicateParentState="true"
-                               android:clickable="false"
-                               android:focusable="false"
-                               android:src="@drawable/address_bar_url"/>
-
-                </view>
-
-            </Gecko.RelativeLayout>
-
-            <LinearLayout style="@style/AddressBar.Button"
-                          android:paddingRight="52dp"
-                          android:orientation="horizontal">
-
-                <ImageButton android:id="@+id/favicon"
-                             style="@style/AddressBar.ImageButton"
-                             android:layout_width="@dimen/browser_toolbar_favicon_size"
-                             android:layout_height="fill_parent"
-                             android:scaleType="fitCenter"
-                             android:paddingLeft="8dip"
-                             android:layout_marginRight="4dip"
-                             android:layout_gravity="center_vertical"
-                             android:src="@drawable/favicon"/>
-
-                <ImageButton android:id="@+id/site_security"
-                             style="@style/AddressBar.ImageButton"
-                             android:layout_width="@dimen/browser_toolbar_lock_width"
-                             android:scaleType="fitCenter"
-                             android:layout_marginLeft="-4dip"
-                             android:src="@drawable/site_security_level"
-                             android:contentDescription="@string/site_security"
-                             android:visibility="gone"/>
-
-                <Gecko.TextView android:id="@+id/awesome_bar_title"
-                                style="@style/AddressBar.Button"
-                                android:layout_width="fill_parent"
-                                android:layout_height="fill_parent"
-                                android:layout_weight="1.0"
-                                android:singleLine="true"
-                                android:paddingRight="8dp"
-                                android:textColor="@color/awesome_bar_title"
-                                android:textColorHint="@color/awesome_bar_title_hint"
-                                android:gravity="center_vertical|left"
-                                android:hint="@string/awesomebar_default_text"
-                                android:layout_gravity="center_vertical"
-                                gecko:autoUpdateTheme="false"/>
-
-                <ImageButton android:id="@+id/reader"
-                             style="@style/AddressBar.ImageButton.Icon"
-                             android:src="@drawable/reader"
-                             android:contentDescription="@string/reader"
-                             android:visibility="gone"/>
-
-                <ImageButton android:id="@+id/stop"
-                             style="@style/AddressBar.ImageButton.Icon"
-                             android:src="@drawable/urlbar_stop"
-                             android:contentDescription="@string/stop"
-                             android:visibility="gone"/>
-
-            </LinearLayout>
-
-        </FrameLayout>
-
-        <LinearLayout android:id="@+id/menu_items"
-                      android:layout_width="0dip"
-                      android:layout_height="0dip"
-                      android:visibility="gone"/>
-
-        <Gecko.ShapedButton android:id="@+id/menu"
-                            style="@style/AddressBar.ImageButton.Unused"/>
-
-        <Gecko.ShapedButton android:id="@+id/tabs"
-                            style="@style/AddressBar.ImageButton"
-                            android:layout_width="72dip"
-                            android:layout_alignParentRight="true"
-                            gecko:curveTowards="right"
-                            android:background="@drawable/shaped_button"
-                            android:gravity="center_vertical"
-                            android:src="@drawable/tabs_level"
-                            android:paddingLeft="37dip"
-                            android:paddingRight="11dip"/>
-
-        <Gecko.TextSwitcher android:id="@+id/tabs_count"
-                            style="@style/AddressBar.ImageButton"
-                            android:layout_width="44.5dip"
-                            android:layout_height="wrap_content"
-                            android:layout_marginTop="5dp"
-                            android:layout_alignRight="@id/tabs"
-                            android:gravity="center_horizontal"/>
-
-        <ImageView android:id="@+id/shadow"
-                   android:layout_width="fill_parent"
-                   android:layout_height="2dp"
-                   android:layout_alignParentBottom="true"
-                   android:background="@drawable/address_bar_bg_shadow_repeat"
-                   android:visibility="gone"/>
-
-    </RelativeLayout>
-
-</org.mozilla.gecko.BrowserToolbarLayout>
--- a/mobile/android/base/resources/layout/browser_toolbar_menu.xml
+++ b/mobile/android/base/resources/layout/browser_toolbar_menu.xml
@@ -1,172 +1,146 @@
 <?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/. -->
 
 <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">
-
-    <RelativeLayout android:id="@+id/address_bar"
-                    style="@style/AddressBar">
+              style="@style/BrowserToolbar"
+              android:layout_centerVertical="true"
+              android:clickable="true"
+              android:focusable="true">
 
-        <ImageButton android:id="@+id/back"
-                     android:contentDescription="@string/back"
-                     style="@style/AddressBar.ImageButton.Unused"/>
-
-        <ImageButton style="@style/AddressBar.ImageButton.Forward"
-                     android:id="@+id/forward"/>
+    <ImageButton android:id="@+id/back"
+                 style="@style/AddressBar.ImageButton.Back"/>
 
-        <org.mozilla.gecko.BrowserToolbarBackground android:id="@+id/address_bar_bg"
-                                                    android:layout_width="fill_parent"
-                                                    android:layout_height="fill_parent"
-                                                    android:layout_marginRight="66dip"
-                                                    android:layout_alignParentTop="true"
-                                                    android:layout_alignParentRight="true"
-                                                    gecko:curveTowards="right"
-                                                    android:background="@drawable/address_bar_bg"/>
-
-        <FrameLayout style="@style/AddressBar.Button.Container"
-                     android:id="@+id/addressbar">
+    <ImageButton android:id="@+id/forward"
+                 style="@style/AddressBar.ImageButton.Forward"/>
 
-            <Gecko.RelativeLayout android:id="@+id/awesome_bar"
-                                  style="@style/AddressBar.Button"
-                                  android:layout_centerVertical="true"
-                                  android:clickable="true"
-                                  android:focusable="true">
-
-                <ImageView android:id="@+id/awesome_bar_entry"
-                           style="@style/AddressBar.Button"
-                           android:duplicateParentState="true"
-                           android:layout_marginTop="5dp"
-                           android:layout_marginBottom="5dp"
-                           android:layout_marginRight="100dp"
-                           android:clickable="false"
-                           android:focusable="false"
-                           android:background="@drawable/address_bar_url"/>
+    <org.mozilla.gecko.BrowserToolbarBackground android:id="@+id/address_bar_bg"
+                                                android:layout_width="fill_parent"
+                                                android:layout_height="fill_parent"
+                                                android:background="@drawable/address_bar_bg"/>
 
-                <view class="org.mozilla.gecko.BrowserToolbar$RightEdge"
-                      android:id="@+id/awesome_bar_right_edge"
-                      style="@style/AddressBar.ImageButton"
-                      android:layout_width="50dp"
-                      android:layout_height="fill_parent"
-                      android:paddingTop="5dp"
-                      android:paddingBottom="5dp"
-                      android:layout_centerVertical="true"
-                      android:layout_alignParentRight="true"
-                      android:layout_marginRight="75dp"
-                      android:duplicateParentState="true"
-                      android:visibility="invisible"
-                      android:background="@drawable/address_bar_bg">
+    <ImageView android:id="@+id/awesome_bar_entry"
+               style="@style/AddressBar.Button"
+               android:layout_marginLeft="4dp"
+               android:layout_marginRight="-22dp"
+               android:layout_marginTop="5dp"
+               android:layout_marginBottom="5dp"
+               android:layout_centerVertical="true"
+               android:layout_toLeftOf="@+id/tabs"
+               android:paddingRight="4dp"
+               android:duplicateParentState="true"
+               android:clickable="false"
+               android:focusable="false"
+               android:src="@drawable/address_bar_url"
+               android:scaleType="fitXY"/>
 
-                    <ImageView android:layout_width="50dp"
-                               android:layout_height="fill_parent"
-                               android:scaleType="fitXY"
-                               android:layout_marginLeft="-26dp"
-                               android:duplicateParentState="true"
-                               android:clickable="false"
-                               android:focusable="false"
-                               android:src="@drawable/address_bar_url"/>
-
-                </view>
-
-            </Gecko.RelativeLayout>
+    <ImageView android:id="@+id/awesome_bar_right_edge"
+               style="@style/AddressBar.Button"
+               android:layout_alignLeft="@id/awesome_bar_entry"
+               android:layout_alignRight="@id/awesome_bar_entry"
+               android:layout_alignTop="@id/awesome_bar_entry"
+               android:layout_alignBottom="@id/awesome_bar_entry"
+               android:paddingRight="4dp"
+               android:duplicateParentState="true"
+               android:clickable="false"
+               android:focusable="false"
+               android:src="@drawable/address_bar_right_edge"
+               android:scaleType="fitXY"/>
 
-            <LinearLayout style="@style/AddressBar.Button"
-                          android:paddingRight="100dp"
-                          android:orientation="horizontal">
+    <LinearLayout android:id="@+id/menu_items"
+                  style="@style/AddressBar.ImageButton.Unused"/>
 
-                <ImageButton android:id="@+id/favicon"
-                             style="@style/AddressBar.ImageButton"
-                             android:layout_width="@dimen/browser_toolbar_favicon_size"
-                             android:layout_height="fill_parent"
-                             android:scaleType="fitCenter"
-                             android:paddingLeft="8dip"
-                             android:layout_marginRight="4dip"
-                             android:layout_gravity="center_vertical"
-                             android:src="@drawable/favicon"/>
+    <Gecko.ShapedButton android:id="@+id/menu"
+                        style="@style/AddressBar.ImageButton"
+                        android:layout_width="48dip"
+                        android:layout_alignParentRight="true"
+                        android:gravity="center_vertical"
+                        android:src="@drawable/menu_level"
+                        android:contentDescription="@string/menu"
+                        android:background="@drawable/shaped_button"
+                        android:visibility="gone"/>
 
-                <ImageButton android:id="@+id/site_security"
-                             style="@style/AddressBar.ImageButton"
-                             android:layout_width="@dimen/browser_toolbar_lock_width"
-                             android:scaleType="fitCenter"
-                             android:layout_marginLeft="-4dip"
-                             android:src="@drawable/site_security_level"
-                             android:contentDescription="@string/site_security"
-                             android:visibility="gone"/>
+    <Gecko.ShapedButton android:id="@+id/tabs"
+                        style="@style/AddressBar.ImageButton"
+                        android:layout_width="72dip"
+                        android:layout_toLeftOf="@id/menu"
+                        android:layout_alignWithParentIfMissing="true"
+                        gecko:curveTowards="right"
+                        android:background="@drawable/shaped_button"
+                        android:gravity="center_vertical"
+                        android:src="@drawable/tabs_level"
+                        android:paddingLeft="37dip"
+                        android:paddingRight="11dip"/>
 
-                <Gecko.TextView android:id="@+id/awesome_bar_title"
-                                style="@style/AddressBar.Button"
-                                android:layout_width="fill_parent"
-                                android:layout_height="fill_parent"
-                                android:layout_weight="1.0"
-                                android:singleLine="true"
-                                android:paddingRight="8dp"
-                                android:textColor="@color/awesome_bar_title"
-                                android:textColorHint="@color/awesome_bar_title_hint"
-                                android:gravity="center_vertical|left"
-                                android:hint="@string/awesomebar_default_text"
-                                android:layout_gravity="center_vertical"
-                                gecko:autoUpdateTheme="false"/>
+    <Gecko.TextSwitcher android:id="@+id/tabs_count"
+                        style="@style/AddressBar.ImageButton"
+                        android:layout_width="44.5dip"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="5dp"
+                        android:layout_alignRight="@id/tabs"
+                        android:gravity="center_horizontal"/>
 
-                <ImageButton android:id="@+id/reader"
-                             style="@style/AddressBar.ImageButton.Icon"
-                             android:src="@drawable/reader"
-                             android:contentDescription="@string/reader"
-                             android:visibility="gone"/>
+    <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/stop"
-                             style="@style/AddressBar.ImageButton.Icon"
-                             android:src="@drawable/urlbar_stop"
-                             android:contentDescription="@string/stop"
-                             android:visibility="gone"/>
-
-            </LinearLayout>
-
-        </FrameLayout>
+        <ImageButton android:id="@+id/favicon"
+                     style="@style/AddressBar.ImageButton"
+                     android:layout_width="@dimen/browser_toolbar_favicon_size"
+                     android:layout_height="fill_parent"
+                     android:scaleType="fitCenter"
+                     android:paddingLeft="12dip"
+                     android:layout_marginRight="4dip"
+                     android:layout_gravity="center_vertical"
+                     android:src="@drawable/favicon"/>
 
-        <LinearLayout android:id="@+id/menu_items"
-                      android:layout_width="0dip"
-                      android:layout_height="0dip"
-                      android:visibility="gone"/>
-
-        <Gecko.ShapedButton android:id="@+id/menu"
-                            style="@style/AddressBar.ImageButton"
-                            android:layout_width="48dip"
-                            android:layout_alignParentRight="true"
-                            android:gravity="center_vertical"
-                            android:src="@drawable/menu_level"
-                            android:contentDescription="@string/menu"
-                            android:background="@drawable/shaped_button"/>
+        <ImageButton android:id="@+id/site_security"
+                     style="@style/AddressBar.ImageButton"
+                     android:layout_width="@dimen/browser_toolbar_lock_width"
+                     android:scaleType="fitCenter"
+                     android:layout_marginLeft="-4dip"
+                     android:src="@drawable/site_security_level"
+                     android:contentDescription="@string/site_security"
+                     android:visibility="gone"/>
 
-        <Gecko.ShapedButton android:id="@+id/tabs"
-                            style="@style/AddressBar.ImageButton"
-                            android:layout_width="72dip"
-                            android:layout_marginRight="48dip"
-                            android:layout_alignParentRight="true"
-                            gecko:curveTowards="right"
-                            android:background="@drawable/shaped_button"
-                            android:gravity="center_vertical"
-                            android:src="@drawable/tabs_level"
-                            android:paddingLeft="37dip"
-                            android:paddingRight="11dip"/>
+        <Gecko.TextView android:id="@+id/awesome_bar_title"
+                        style="@style/AddressBar.Button"
+                        android:layout_width="fill_parent"
+                        android:layout_height="fill_parent"
+                        android:layout_weight="1.0"
+                        android:singleLine="true"
+                        android:paddingRight="8dp"
+                        android:textColor="@color/awesome_bar_title"
+                        android:textColorHint="@color/awesome_bar_title_hint"
+                        android:gravity="center_vertical|left"
+                        android:hint="@string/awesomebar_default_text"
+                        android:layout_gravity="center_vertical"
+                        gecko:autoUpdateTheme="false"/>
 
-        <Gecko.TextSwitcher android:id="@+id/tabs_count"
-                            style="@style/AddressBar.ImageButton"
-                            android:layout_width="44.5dip"
-                            android:layout_height="wrap_content"
-                            android:layout_marginTop="5dp"
-                            android:layout_alignRight="@id/tabs"
-                            android:gravity="center_horizontal"/>
+        <ImageButton android:id="@+id/reader"
+                     style="@style/AddressBar.ImageButton.Icon"
+                     android:src="@drawable/reader"
+                     android:contentDescription="@string/reader"
+                     android:visibility="gone"/>
 
-        <ImageView android:id="@+id/shadow"
-                   android:layout_width="fill_parent"
-                   android:layout_height="2dp"
-                   android:layout_alignParentBottom="true"
-                   android:background="@drawable/address_bar_bg_shadow_repeat"
-                   android:visibility="gone"/>
+        <ImageButton android:id="@+id/stop"
+                     style="@style/AddressBar.ImageButton.Icon"
+                     android:src="@drawable/urlbar_stop"
+                     android:contentDescription="@string/stop"
+                     android:visibility="gone"/>
 
-    </RelativeLayout>
+    </LinearLayout>
+
+    <ImageView android:id="@+id/shadow"
+               android:layout_width="fill_parent"
+               android:layout_height="2dp"
+               android:layout_alignParentBottom="true"
+               android:background="@drawable/address_bar_bg_shadow_repeat"
+               android:visibility="gone"/>
 
 </org.mozilla.gecko.BrowserToolbarLayout>
--- a/mobile/android/base/resources/values-large-v11/dimens.xml
+++ b/mobile/android/base/resources/values-large-v11/dimens.xml
@@ -2,15 +2,12 @@
 <!-- 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_icon_width">45dp</dimen>
     <dimen name="menu_popup_arrow_margin">8dip</dimen>
     <dimen name="tabs_counter_size">26sp</dimen>
-    <dimen name="addressbar_offset_left">90dp</dimen>
-    <dimen name="addressbar_offset_left_noforward">50dip</dimen>
 
 </resources>
--- a/mobile/android/base/resources/values-large-v11/styles.xml
+++ b/mobile/android/base/resources/values-large-v11/styles.xml
@@ -28,36 +28,34 @@
       <item name="android:paddingBottom">0dip</item>
       <!-- Increase the padding on left and right on large screen sizes -->
       <item name="android:paddingLeft">60dip</item>
       <item name="android:paddingRight">60dip</item>
     </style>
 
     <style name="AddressBar.ImageButton.Forward">
         <item name="android:contentDescription">@string/forward</item>
-        <item name="android:layout_width">64dip</item>
+        <item name="android:layout_width">45dip</item>
         <item name="android:layout_height">38dip</item>
-        <item name="android:paddingLeft">26dp</item>
+        <item name="android:paddingLeft">10dp</item>
         <item name="android:paddingTop">7dp</item>
         <item name="android:paddingBottom">7dp</item>
         <item name="android:layout_gravity">center_vertical</item>
         <item name="android:layout_centerVertical">true</item>
         <item name="android:src">@drawable/ic_menu_forward</item>
         <item name="android:background">@drawable/address_bar_nav_button</item>
         <!-- Start with the button hidden -->
         <item name="android:alpha">0</item>
         <item name="android:layout_marginLeft">@dimen/forward_default_offset</item>
     </style>
 
    <style name="AddressBar.Button.Container">
         <item name="android:layout_marginTop">6dp</item>
         <item name="android:layout_marginBottom">6dp</item>
-        <item name="android:layout_marginRight">0dp</item>
         <!-- Start with forward hidden -->
-        <item name="android:layout_marginLeft">@dimen/addressbar_offset_left_noforward</item>
         <item name="android:orientation">horizontal</item>
     </style>
 
     <style name="TabsList" parent="TabsListBase">
          <item name="android:orientation">horizontal</item>
     </style>
 
     <style name="TabsItem">
--- a/mobile/android/base/resources/values/dimens.xml
+++ b/mobile/android/base/resources/values/dimens.xml
@@ -25,17 +25,17 @@
     <dimen name="awesomebar_row_height">48dp</dimen>
     <dimen name="awesomebar_row_favicon_size_small">16dp</dimen>
     <dimen name="awesomebar_row_favicon_size_large">32dp</dimen>
     <dimen name="awesomebar_row_favicon_bg">32dp</dimen>
     <dimen name="awesomebar_row_favicon_bg_radius">1dp</dimen>
     <dimen name="awesomebar_tab_transparency_height">38dp</dimen>
     <dimen name="browser_toolbar_height">48dp</dimen>
     <dimen name="browser_toolbar_button_padding">12dp</dimen>
-    <dimen name="browser_toolbar_icon_width">36dp</dimen>
+    <dimen name="browser_toolbar_icon_width">48dp</dimen>
     <dimen name="browser_toolbar_lock_width">20dp</dimen>
     <dimen name="browser_toolbar_favicon_size">29.33dip</dimen>
 
     <!-- Max width of the doorhanger on tablets -->
     <dimen name="doorhanger_width">400dp</dimen>
 
     <dimen name="flow_layout_spacing">6dp</dimen>
     <dimen name="menu_item_icon">21dp</dimen>
@@ -64,12 +64,11 @@
     <dimen name="tabs_list_divider_height">2dp</dimen>
     <dimen name="tabs_sidebar_width">200dp</dimen>
     <dimen name="tabs_tray_horizontal_height">156dp</dimen>
     <dimen name="text_selection_handle_width">30dp</dimen>
     <dimen name="text_selection_handle_height">44dp</dimen>
     <dimen name="text_selection_handle_shadow">2dp</dimen>
     <dimen name="validation_message_height">50dp</dimen>
     <dimen name="validation_message_margin_top">6dp</dimen>
-    <dimen name="forward_default_offset">-11dip</dimen>
-    <dimen name="addressbar_offset_left">90dp</dimen>
-    <dimen name="addressbar_offset_left_noforward">50dip</dimen>
+    <dimen name="forward_default_offset">-13dip</dimen>
+    <dimen name="addressbar_offset_left">32dp</dimen>
 </resources>
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -170,39 +170,34 @@
 
     <!-- Address bar - Button -->
     <style name="AddressBar.Button">
         <item name="android:layout_height">fill_parent</item>
         <item name="android:textSize">16sp</item>
         <item name="android:background">@android:color/transparent</item>
     </style>
 
-    <style name="AddressBar.Button.Container">
-        <item name="android:layout_marginLeft">4dp</item>
-        <item name="android:layout_marginRight">4dp</item>
-        <item name="android:layout_toLeftOf">@id/menu_items</item>
-        <item name="android:layout_alignParentLeft">true</item>
-        <item name="android:layout_alignParentBottom">true</item>
-        <item name="android:layout_centerVertical">true</item>
-    </style>
-
     <!-- Address bar - Image Button -->
     <style name="AddressBar.ImageButton" parent="AddressBar.Button">
         <item name="android:scaleType">center</item>
         <item name="android:layout_gravity">center_vertical</item>
         <item name="android:background">@android:color/transparent</item>
     </style>
 
     <!-- Address bar - Image Button - Unused -->
     <style name="AddressBar.ImageButton.Unused">
         <item name="android:layout_width">0dip</item>
         <item name="android:layout_height">0dip</item>
         <item name="android:visibility">gone</item>
     </style>
 
+    <style name="AddressBar.ImageButton.Back" parent="AddressBar.ImageButton.Unused">
+        <item name="android:contentDescription">@string/back</item>
+    </style>
+
     <style name="AddressBar.ImageButton.Forward" parent="AddressBar.ImageButton.Unused">
         <item name="android:contentDescription">@string/forward</item>
     </style>
 
     <!-- Address bar - Image Button - Icon -->
     <style name="AddressBar.ImageButton.Icon">
          <item name="android:layout_width">@dimen/browser_toolbar_icon_width</item>
          <item name="android:layout_height">@dimen/browser_toolbar_height</item>
--- a/mobile/android/base/tests/BaseTest.java.in
+++ b/mobile/android/base/tests/BaseTest.java.in
@@ -185,17 +185,17 @@ abstract class BaseTest extends Activity
     }
 
     /**
      * Click on the awesome bar element and return the resulting activity.
      * @return The created activity, or null if the awesome bar cannot be clicked.
      */
     protected final Activity clickOnAwesomeBar() {
         Activity activity = null;
-        Element awesomebar = mDriver.findElement(mActivity, "awesome_bar");
+        Element awesomebar = mDriver.findElement(mActivity, "browser_toolbar");
         if (awesomebar != null) {
             activity = getActivityFromClick(awesomebar);
             if (activity == null) {
                 mAsserter.dumpLog("failed to click on awesome bar!");
             }
         }
         return activity;
     }