mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 906041 - (Part 1) Don't change the visibility of the home pager if we're in editing mode. r=lucasr
This commit is contained in:
parent
5931cc9ca6
commit
a7723f6c77
@ -182,16 +182,7 @@ abstract public class BrowserApp extends GeckoApp
|
||||
// fall through
|
||||
case SELECTED:
|
||||
if (Tabs.getInstance().isSelectedTab(tab)) {
|
||||
if (isAboutHome(tab)) {
|
||||
showHomePager(tab.getAboutHomePage());
|
||||
|
||||
if (isDynamicToolbarEnabled()) {
|
||||
// Show the toolbar.
|
||||
mLayerView.getLayerMarginsAnimator().showMargins(false);
|
||||
}
|
||||
} else {
|
||||
hideHomePager();
|
||||
}
|
||||
updateHomePagerForTab(tab);
|
||||
|
||||
if (mSiteIdentityPopup != null)
|
||||
mSiteIdentityPopup.dismiss();
|
||||
@ -1508,6 +1499,27 @@ abstract public class BrowserApp extends GeckoApp
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
if (isAboutHome(tab)) {
|
||||
showHomePager(tab.getAboutHomePage());
|
||||
|
||||
if (isDynamicToolbarEnabled()) {
|
||||
// Show the toolbar.
|
||||
mLayerView.getLayerMarginsAnimator().showMargins(false);
|
||||
}
|
||||
} else {
|
||||
hideHomePager();
|
||||
}
|
||||
}
|
||||
|
||||
private void showHomePager(HomePager.Page page) {
|
||||
showHomePagerWithAnimator(page, null);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user