Backed out changeset fa1f219e3eba (bug 1077755) for bustage CLOSED TREE
authorMichael Comella <michael.l.comella@gmail.com>
Fri, 10 Oct 2014 15:40:30 -0700
changeset 209809 708b45d9b1b110a8c0d21fb18975e79f64772d13
parent 209808 d06ee550656ab6783fc2e066d8b02f194867a91e
child 209843 999ad2f1e1089d203811266bc3c9bfa92308f029
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs1077755
milestone35.0a1
backs outfa1f219e3ebaeac89b707d2250a79e53560413a0
Backed out changeset fa1f219e3eba (bug 1077755) for bustage CLOSED TREE
mobile/android/base/menu/MenuItemActionBar.java
mobile/android/base/newtablet/res/drawable-large-v11/new_tablet_action_bar_button.xml
mobile/android/base/toolbar/BrowserToolbarTabletBase.java
mobile/android/base/widget/ThemedEditText.java.in
mobile/android/base/widget/ThemedImageButton.java.in
mobile/android/base/widget/ThemedImageView.java.in
mobile/android/base/widget/ThemedRelativeLayout.java.in
mobile/android/base/widget/ThemedTextView.java.in
mobile/android/base/widget/ThemedView.java.frag
mobile/android/base/widget/ThemedView.java.in
--- a/mobile/android/base/menu/MenuItemActionBar.java
+++ b/mobile/android/base/menu/MenuItemActionBar.java
@@ -1,24 +1,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.menu;
 
 import org.mozilla.gecko.NewTabletUI;
 import org.mozilla.gecko.R;
-import org.mozilla.gecko.widget.ThemedImageButton;
 
 import android.content.Context;
 import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
 import android.widget.ImageButton;
 
-public class MenuItemActionBar extends ThemedImageButton
+public class MenuItemActionBar extends ImageButton
                                implements GeckoMenuItem.Layout {
     private static final String LOGTAG = "GeckoMenuItemActionBar";
 
     public MenuItemActionBar(Context context) {
         this(context, null);
     }
 
     public MenuItemActionBar(Context context, AttributeSet attrs) {
--- a/mobile/android/base/newtablet/res/drawable-large-v11/new_tablet_action_bar_button.xml
+++ b/mobile/android/base/newtablet/res/drawable-large-v11/new_tablet_action_bar_button.xml
@@ -1,47 +1,14 @@
 <?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/. -->
 
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
-          xmlns:gecko="http://schemas.android.com/apk/res-auto">
-
-   <item gecko:state_private="true"
-         android:state_pressed="true"
-         android:state_enabled="true">
-
-        <inset android:insetTop="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
-               android:insetBottom="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
-               android:insetLeft="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal"
-               android:insetRight="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal">
-            <shape android:shape="rectangle">
-                <solid android:color="@color/new_tablet_highlight_pb"/>
-                <corners android:radius="@dimen/new_tablet_browser_toolbar_menu_item_corner_radius"/>
-            </shape>
-        </inset>
-
-    </item>
-
-    <item gecko:state_private="true"
-          android:state_focused="true"
-          android:state_pressed="false">
-
-        <inset android:insetTop="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
-               android:insetBottom="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
-               android:insetLeft="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal"
-               android:insetRight="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal">
-            <shape android:shape="rectangle">
-                <solid android:color="@color/new_tablet_highlight_focused_pb"/>
-                <corners android:radius="@dimen/new_tablet_browser_toolbar_menu_item_corner_radius"/>
-            </shape>
-        </inset>
-
-    </item>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
 
     <item android:state_pressed="true"
           android:state_enabled="true">
 
         <inset android:insetTop="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
                android:insetBottom="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
                android:insetLeft="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal"
                android:insetRight="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal">
--- a/mobile/android/base/toolbar/BrowserToolbarTabletBase.java
+++ b/mobile/android/base/toolbar/BrowserToolbarTabletBase.java
@@ -5,17 +5,16 @@
 
 package org.mozilla.gecko.toolbar;
 
 import java.util.Arrays;
 
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.Tab;
 import org.mozilla.gecko.Tabs;
-import org.mozilla.gecko.menu.MenuItemActionBar;
 
 import android.content.Context;
 import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
 import android.view.View;
 import android.widget.Button;
 import android.widget.ImageButton;
 import android.widget.LinearLayout;
@@ -117,23 +116,18 @@ abstract class BrowserToolbarTabletBase 
         super.setNextFocusDownId(nextId);
         backButton.setNextFocusDownId(nextId);
         forwardButton.setNextFocusDownId(nextId);
     }
 
     @Override
     public void setPrivateMode(final boolean isPrivate) {
         super.setPrivateMode(isPrivate);
-
         backButton.setPrivateMode(isPrivate);
         forwardButton.setPrivateMode(isPrivate);
-        for (int i = 0; i < actionItemBar.getChildCount(); ++i) {
-            final MenuItemActionBar child = (MenuItemActionBar) actionItemBar.getChildAt(i);
-            child.setPrivateMode(isPrivate);
-        }
     }
 
     protected boolean canDoBack(final Tab tab) {
         return (tab.canDoBack() && !isEditing());
     }
 
     protected boolean canDoForward(final Tab tab) {
         return (tab.canDoForward() && !isEditing());
--- a/mobile/android/base/widget/ThemedEditText.java.in
+++ b/mobile/android/base/widget/ThemedEditText.java.in
@@ -1,5 +1,4 @@
 #filter substitution
 #define VIEW_NAME_SUFFIX EditText
 #define BASE_TYPE android.widget.EditText
-#define STYLE_CONSTRUCTOR 1
 #include ThemedView.java.frag
--- a/mobile/android/base/widget/ThemedImageButton.java.in
+++ b/mobile/android/base/widget/ThemedImageButton.java.in
@@ -1,5 +1,4 @@
 #filter substitution
 #define VIEW_NAME_SUFFIX ImageButton
 #define BASE_TYPE android.widget.ImageButton
-#define STYLE_CONSTRUCTOR 1
 #include ThemedView.java.frag
--- a/mobile/android/base/widget/ThemedImageView.java.in
+++ b/mobile/android/base/widget/ThemedImageView.java.in
@@ -1,5 +1,4 @@
 #filter substitution
 #define VIEW_NAME_SUFFIX ImageView
 #define BASE_TYPE android.widget.ImageView
-#define STYLE_CONSTRUCTOR 1
 #include ThemedView.java.frag
--- a/mobile/android/base/widget/ThemedRelativeLayout.java.in
+++ b/mobile/android/base/widget/ThemedRelativeLayout.java.in
@@ -1,5 +1,4 @@
 #filter substitution
 #define VIEW_NAME_SUFFIX RelativeLayout
 #define BASE_TYPE android.widget.RelativeLayout
-#define STYLE_CONSTRUCTOR 1
 #include ThemedView.java.frag
--- a/mobile/android/base/widget/ThemedTextView.java.in
+++ b/mobile/android/base/widget/ThemedTextView.java.in
@@ -1,5 +1,4 @@
 #filter substitution
 #define VIEW_NAME_SUFFIX TextView
 #define BASE_TYPE android.widget.TextView
-#define STYLE_CONSTRUCTOR 1
 #include ThemedView.java.frag
--- a/mobile/android/base/widget/ThemedView.java.frag
+++ b/mobile/android/base/widget/ThemedView.java.frag
@@ -26,26 +26,17 @@ public class Themed@VIEW_NAME_SUFFIX@ ex
     protected static final int[] PRIVATE_STATE_SET = { R.attr.state_private };
 
     private boolean mIsPrivate;
     private boolean mIsLight;
     private boolean mIsDark;
     private boolean mAutoUpdateTheme = true;
 
     public Themed@VIEW_NAME_SUFFIX@(Context context, AttributeSet attrs) {
-        this(context, attrs, 0);
-    }
-
-    public Themed@VIEW_NAME_SUFFIX@(Context context, AttributeSet attrs, int defStyle) {
-#ifdef STYLE_CONSTRUCTOR
-        super(context, attrs, defStyle);
-#else
         super(context, attrs);
-#endif
-
         mTheme = ((GeckoApplication) context.getApplicationContext()).getLightweightTheme();
 
         TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.LightweightTheme);
         mAutoUpdateTheme = a.getBoolean(R.styleable.LightweightTheme_autoUpdateTheme, true);
         a.recycle();
     }
 
     @Override
--- a/mobile/android/base/widget/ThemedView.java.in
+++ b/mobile/android/base/widget/ThemedView.java.in
@@ -1,5 +1,4 @@
 #filter substitution
 #define VIEW_NAME_SUFFIX View
 #define BASE_TYPE android.view.View
-#define STYLE_CONSTRUCTOR 1
 #include ThemedView.java.frag