author | Michael Comella <michael.l.comella@gmail.com> |
Mon, 28 Oct 2013 12:41:43 -0700 | |
changeset 152646 | 85ed494c5b02228098c428444361ee171e96fca8 |
parent 152645 | 8c766adb98f4918f1d11a01a4d348f50585c1648 |
child 152647 | 7c559d8ccbb78b3958b970aa317dc3fdabbfe607 |
push id | 35608 |
push user | emorley@mozilla.com |
push date | Tue, 29 Oct 2013 16:36:07 +0000 |
treeherder | mozilla-inbound@936a5d4b340d [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 915918 |
milestone | 27.0a1 |
backs out | 906461e491d9e1a7840af646252b7ea5d117658c |
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
|
--- a/mobile/android/base/BrowserApp.java +++ b/mobile/android/base/BrowserApp.java @@ -162,19 +162,16 @@ abstract public class BrowserApp extends private Integer mPrefObserverId; private SharedPreferencesHelper mSharedPreferencesHelper; private OrderedBroadcastHelper mOrderedBroadcastHelper; private BrowserHealthReporter mBrowserHealthReporter; - // The tab to be selected on editing mode exit. - private Integer mTargetTabForEditingMode = null; - // The animator used to toggle HomePager visibility has a race where if the HomePager is shown // (starting the animation), the HomePager is hidden, and the HomePager animation completes, // both the web content and the HomePager will be hidden. This flag is used to prevent the // race by determining if the web content should be hidden at the animation's end. private boolean mHideWebContentOnAnimationEnd = false; private SiteIdentityPopup mSiteIdentityPopup; @@ -485,19 +482,17 @@ abstract public class BrowserApp extends public void onStartEditing() { // Temporarily disable doorhanger notifications. mDoorHangerPopup.disable(); } }); mBrowserToolbar.setOnStopEditingListener(new BrowserToolbar.OnStopEditingListener() { public void onStopEditing() { - selectTargetTabForEditingMode(); - - // Re-enable doorhanger notifications. They may trigger on the selected tab above. + // Re-enable doorhanger notifications. mDoorHangerPopup.enable(); } }); // Intercept key events for gamepad shortcuts mBrowserToolbar.setOnKeyListener(this); if (mTabsPanel != null) { @@ -1311,20 +1306,17 @@ abstract public class BrowserApp extends if (tabId < 0) { return false; } // If this tab is already selected, just hide the home pager. if (tabs.isSelectedTabId(tabId)) { hideHomePager(); } else { - // Set the target tab to null so it does not get selected (on editing - // mode exit) in lieu of the tab we are about to select. - mTargetTabForEditingMode = null; - Tabs.getInstance().selectTab(tabId); + tabs.selectTab(tabId); } hideBrowserSearch(); mBrowserToolbar.cancelEdit(); return true; } @@ -1428,19 +1420,16 @@ abstract public class BrowserApp extends * Enters editing mode with the specified URL. This method will * always open the HISTORY page on about:home. */ private void enterEditingMode(String url) { if (url == null) { throw new IllegalArgumentException("Cannot handle null URLs in enterEditingMode"); } - final Tab selectedTab = Tabs.getInstance().getSelectedTab(); - mTargetTabForEditingMode = (selectedTab != null ? selectedTab.getId() : null); - final PropertyAnimator animator = new PropertyAnimator(250); animator.setUseHardwareLayer(false); mBrowserToolbar.startEditing(url, animator); showHomePagerWithAnimator(HomePager.Page.TOP_SITES, animator); animator.start(); } @@ -1544,32 +1533,16 @@ abstract public class BrowserApp extends } else { showBrowserSearch(); mHomePager.setVisibility(View.INVISIBLE); mBrowserSearch.filter(searchTerm, handler); } } /** - * Selects the target tab for editing mode. This is expected to be the tab selected on editing - * mode entry, unless it is subsequently overridden. - * - * A background tab may be selected while editing mode is active (e.g. popups), causing the - * new url to load in the newly selected tab. Call this method on editing mode exit to - * mitigate this. - */ - private void selectTargetTabForEditingMode() { - if (mTargetTabForEditingMode != null) { - Tabs.getInstance().selectTab(mTargetTabForEditingMode); - } - - mTargetTabForEditingMode = null; - } - - /** * Shows or hides the home pager for the given tab. */ private void updateHomePagerForTab(Tab tab) { // Don't change the visibility of the home pager if we're in editing mode. if (mBrowserToolbar.isEditing()) { return; }