зеркало из https://github.com/mozilla/gecko-dev.git
Bug 722661 - Part 5: Miscellaneous fixes. r=mfinkle
This commit is contained in:
Родитель
cb554bb2d5
Коммит
649ceaec25
|
@ -217,10 +217,6 @@ abstract public class BrowserApp extends GeckoApp
|
||||||
|
|
||||||
mFindInPageBar = (FindInPageBar) findViewById(R.id.find_in_page);
|
mFindInPageBar = (FindInPageBar) findViewById(R.id.find_in_page);
|
||||||
|
|
||||||
if (savedInstanceState != null) {
|
|
||||||
mBrowserToolbar.setTitle(savedInstanceState.getString(SAVED_STATE_TITLE));
|
|
||||||
}
|
|
||||||
|
|
||||||
registerEventListener("CharEncoding:Data");
|
registerEventListener("CharEncoding:Data");
|
||||||
registerEventListener("CharEncoding:State");
|
registerEventListener("CharEncoding:State");
|
||||||
registerEventListener("Feedback:LastUrl");
|
registerEventListener("Feedback:LastUrl");
|
||||||
|
@ -271,9 +267,12 @@ abstract public class BrowserApp extends GeckoApp
|
||||||
// show about:home if we aren't restoring previous session
|
// show about:home if we aren't restoring previous session
|
||||||
if (mRestoreMode == RESTORE_NONE) {
|
if (mRestoreMode == RESTORE_NONE) {
|
||||||
Tab tab = Tabs.getInstance().loadUrl("about:home", Tabs.LOADURL_NEW_TAB);
|
Tab tab = Tabs.getInstance().loadUrl("about:home", Tabs.LOADURL_NEW_TAB);
|
||||||
|
} else {
|
||||||
|
hideAboutHome();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Tabs.getInstance().loadUrl(uri, Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_USER_ENTERED);
|
int flags = Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_USER_ENTERED;
|
||||||
|
Tabs.getInstance().loadUrl(uri, flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -634,6 +633,7 @@ abstract public class BrowserApp extends GeckoApp
|
||||||
if (mAboutHomeShowing != null && !mAboutHomeShowing)
|
if (mAboutHomeShowing != null && !mAboutHomeShowing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
mBrowserToolbar.setShadowVisibility(true);
|
||||||
mAboutHomeShowing = false;
|
mAboutHomeShowing = false;
|
||||||
Runnable r = new AboutHomeRunnable(false);
|
Runnable r = new AboutHomeRunnable(false);
|
||||||
mMainHandler.postAtFrontOfQueue(r);
|
mMainHandler.postAtFrontOfQueue(r);
|
||||||
|
@ -646,7 +646,6 @@ abstract public class BrowserApp extends GeckoApp
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
mFormAssistPopup.hide();
|
|
||||||
if (mShow) {
|
if (mShow) {
|
||||||
if (mAboutHomeContent == null) {
|
if (mAboutHomeContent == null) {
|
||||||
mAboutHomeContent = (AboutHomeContent) findViewById(R.id.abouthome_content);
|
mAboutHomeContent = (AboutHomeContent) findViewById(R.id.abouthome_content);
|
||||||
|
|
|
@ -142,7 +142,6 @@ abstract public class GeckoApp
|
||||||
public static final String ACTION_LOAD = "org.mozilla.gecko.LOAD";
|
public static final String ACTION_LOAD = "org.mozilla.gecko.LOAD";
|
||||||
public static final String ACTION_INIT_PW = "org.mozilla.gecko.INIT_PW";
|
public static final String ACTION_INIT_PW = "org.mozilla.gecko.INIT_PW";
|
||||||
public static final String ACTION_WIDGET = "org.mozilla.gecko.WIDGET";
|
public static final String ACTION_WIDGET = "org.mozilla.gecko.WIDGET";
|
||||||
public static final String SAVED_STATE_TITLE = "title";
|
|
||||||
public static final String SAVED_STATE_IN_BACKGROUND = "inBackground";
|
public static final String SAVED_STATE_IN_BACKGROUND = "inBackground";
|
||||||
public static final String SAVED_STATE_PRIVATE_SESSION = "privateSession";
|
public static final String SAVED_STATE_PRIVATE_SESSION = "privateSession";
|
||||||
|
|
||||||
|
@ -701,10 +700,6 @@ abstract public class GeckoApp
|
||||||
if (outState == null)
|
if (outState == null)
|
||||||
outState = new Bundle();
|
outState = new Bundle();
|
||||||
|
|
||||||
Tab tab = Tabs.getInstance().getSelectedTab();
|
|
||||||
if (tab != null)
|
|
||||||
outState.putString(SAVED_STATE_TITLE, tab.getDisplayTitle());
|
|
||||||
|
|
||||||
boolean inBackground =
|
boolean inBackground =
|
||||||
((GeckoApplication)getApplication()).isApplicationInBackground();
|
((GeckoApplication)getApplication()).isApplicationInBackground();
|
||||||
|
|
||||||
|
@ -719,9 +714,11 @@ abstract public class GeckoApp
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tab.getState() == Tab.STATE_DELAYED) {
|
if (tab.getState() == Tab.STATE_DELAYED) {
|
||||||
|
if (tab.getURL() != null) {
|
||||||
byte[] thumbnail = BrowserDB.getThumbnailForUrl(getContentResolver(), tab.getURL());
|
byte[] thumbnail = BrowserDB.getThumbnailForUrl(getContentResolver(), tab.getURL());
|
||||||
if (thumbnail != null)
|
if (thumbnail != null)
|
||||||
processThumbnail(tab, null, thumbnail);
|
processThumbnail(tab, null, thumbnail);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -259,7 +259,9 @@ public class Tab {
|
||||||
|
|
||||||
mTitle = (title == null ? "" : title);
|
mTitle = (title == null ? "" : title);
|
||||||
|
|
||||||
|
if (mUrl != null)
|
||||||
updateHistory(mUrl, mTitle);
|
updateHistory(mUrl, mTitle);
|
||||||
|
|
||||||
Tabs.getInstance().notifyListeners(this, Tabs.TabEvents.TITLE);
|
Tabs.getInstance().notifyListeners(this, Tabs.TabEvents.TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче