mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 192103a30df7 (bug 941868)
This commit is contained in:
parent
0e42b8ba67
commit
e24cd598a6
@ -208,13 +208,9 @@ abstract public class BrowserApp extends GeckoApp
|
||||
|
||||
Log.d(LOGTAG, "BrowserApp.onTabChanged: " + tab.getId() + ": " + msg);
|
||||
switch(msg) {
|
||||
// We don't get a LOCATION_CHANGE event for the first about:home
|
||||
// load, because the previous and current URIs are the
|
||||
// same. That means it's OK to trigger a new favicon load
|
||||
// at this point.
|
||||
case LOCATION_CHANGE:
|
||||
if (Tabs.getInstance().isSelectedTab(tab)) {
|
||||
loadFavicon(tab);
|
||||
maybeCancelFaviconLoad(tab);
|
||||
}
|
||||
// fall through
|
||||
case SELECTED:
|
||||
@ -255,6 +251,9 @@ abstract public class BrowserApp extends GeckoApp
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
break;
|
||||
case PAGE_SHOW:
|
||||
loadFavicon(tab);
|
||||
break;
|
||||
case LINK_FAVICON:
|
||||
// If tab is not loading and the favicon is updated, we
|
||||
// want to load the image straight away. If tab is still
|
||||
|
@ -627,12 +627,6 @@ public class Tab {
|
||||
final String uri = message.getString("uri");
|
||||
final String oldUrl = getURL();
|
||||
mEnteringReaderMode = ReaderModeUtils.isEnteringReaderMode(oldUrl, uri);
|
||||
|
||||
if (TextUtils.equals(oldUrl, uri)) {
|
||||
Log.d(LOGTAG, "Ignoring location change event: URIs are the same.");
|
||||
return;
|
||||
}
|
||||
|
||||
updateURL(uri);
|
||||
updateUserSearch(message.getString("userSearch"));
|
||||
|
||||
@ -645,13 +639,7 @@ public class Tab {
|
||||
}
|
||||
|
||||
setContentType(message.getString("contentType"));
|
||||
|
||||
// We can unconditionally clear the favicon here: we already
|
||||
// short-circuited for both cases in which this was a (pseudo-)
|
||||
// spurious location change, so we're definitely loading a new page.
|
||||
// The same applies to all of the other fields we're wiping out.
|
||||
clearFavicon();
|
||||
|
||||
setHasFeeds(false);
|
||||
updateTitle(null);
|
||||
updateIdentityData(null);
|
||||
|
@ -382,7 +382,6 @@ public class Tabs implements GeckoEventListener {
|
||||
|
||||
@Override
|
||||
public void handleMessage(String event, JSONObject message) {
|
||||
Log.d(LOGTAG, "handleMessage: " + event);
|
||||
try {
|
||||
if (event.equals("Session:RestoreEnd")) {
|
||||
notifyListeners(null, TabEvents.RESTORED);
|
||||
|
@ -536,7 +536,6 @@ public class BrowserToolbar extends GeckoRelativeLayout
|
||||
|
||||
@Override
|
||||
public void onTabChanged(Tab tab, Tabs.TabEvents msg, Object data) {
|
||||
Log.d(LOGTAG, "onTabChanged: " + msg);
|
||||
final Tabs tabs = Tabs.getInstance();
|
||||
|
||||
// These conditions are split into three phases:
|
||||
@ -588,12 +587,7 @@ public class BrowserToolbar extends GeckoRelativeLayout
|
||||
case LOCATION_CHANGE:
|
||||
// A successful location change will cause Tab to notify
|
||||
// us of a title change, so we don't update the title here.
|
||||
// And there's no point in refreshing the UI
|
||||
// if the page is the same.
|
||||
final String oldURL = (String) data;
|
||||
if (!TextUtils.equals(oldURL, tab.getURL())) {
|
||||
refresh();
|
||||
}
|
||||
refresh();
|
||||
break;
|
||||
|
||||
case CLOSED:
|
||||
@ -769,9 +763,8 @@ public class BrowserToolbar extends GeckoRelativeLayout
|
||||
Log.i(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - Throbber start");
|
||||
} else {
|
||||
Tab selectedTab = Tabs.getInstance().getSelectedTab();
|
||||
if (selectedTab != null) {
|
||||
if (selectedTab != null)
|
||||
setFavicon(selectedTab.getFavicon());
|
||||
}
|
||||
|
||||
if (mSpinnerVisible) {
|
||||
setPageActionVisibility(false);
|
||||
@ -1594,7 +1587,6 @@ public class BrowserToolbar extends GeckoRelativeLayout
|
||||
|
||||
@Override
|
||||
public void handleMessage(String event, JSONObject message) {
|
||||
Log.d(LOGTAG, "handleMessage: " + event);
|
||||
if (event.equals("Reader:Click")) {
|
||||
Tab tab = Tabs.getInstance().getSelectedTab();
|
||||
if (tab != null) {
|
||||
@ -1605,6 +1597,7 @@ public class BrowserToolbar extends GeckoRelativeLayout
|
||||
if (tab != null) {
|
||||
tab.addToReadingList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user