Commit 919b0dc5 authored by Brian Nicholson's avatar Brian Nicholson
Browse files

Backout 4ab101096ab3 for breaking favicons. a=backout

parent 9ccc92c4
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -870,7 +870,6 @@ abstract public class GeckoApp
                handleSecurityChange(tabId, mode);
                handleSecurityChange(tabId, mode);
            } else if (event.equals("Content:StateChange")) {
            } else if (event.equals("Content:StateChange")) {
                final int tabId = message.getInt("tabID");
                final int tabId = message.getInt("tabID");
                final String uri = message.getString("uri");
                final boolean success = message.getBoolean("success");
                final boolean success = message.getBoolean("success");
                int state = message.getInt("state");
                int state = message.getInt("state");
                Log.i(LOGTAG, "State - " + state);
                Log.i(LOGTAG, "State - " + state);
@@ -878,7 +877,7 @@ abstract public class GeckoApp
                    if ((state & GeckoAppShell.WPL_STATE_START) != 0) {
                    if ((state & GeckoAppShell.WPL_STATE_START) != 0) {
                        Log.i(LOGTAG, "Got a document start");
                        Log.i(LOGTAG, "Got a document start");
                        final boolean showProgress = message.getBoolean("showProgress");
                        final boolean showProgress = message.getBoolean("showProgress");
                        handleDocumentStart(tabId, showProgress, uri);
                        handleDocumentStart(tabId, showProgress);
                    } else if ((state & GeckoAppShell.WPL_STATE_STOP) != 0) {
                    } else if ((state & GeckoAppShell.WPL_STATE_STOP) != 0) {
                        Log.i(LOGTAG, "Got a document stop");
                        Log.i(LOGTAG, "Got a document stop");
                        handleDocumentStop(tabId, success);
                        handleDocumentStop(tabId, success);
@@ -1184,12 +1183,11 @@ abstract public class GeckoApp
        });
        });
    }
    }


    void handleDocumentStart(int tabId, final boolean showProgress, String uri) {
    void handleDocumentStart(int tabId, final boolean showProgress) {
        final Tab tab = Tabs.getInstance().getTab(tabId);
        final Tab tab = Tabs.getInstance().getTab(tabId);
        if (tab == null)
        if (tab == null)
            return;
            return;


        tab.updateURL(uri);
        tab.setState(Tab.STATE_LOADING);
        tab.setState(Tab.STATE_LOADING);
        tab.updateSecurityMode("unknown");
        tab.updateSecurityMode("unknown");


@@ -1197,7 +1195,7 @@ abstract public class GeckoApp
            public void run() {
            public void run() {
                if (Tabs.getInstance().isSelectedTab(tab)) {
                if (Tabs.getInstance().isSelectedTab(tab)) {
                    mBrowserToolbar.setSecurityMode(tab.getSecurityMode());
                    mBrowserToolbar.setSecurityMode(tab.getSecurityMode());
                    if (showProgress && tab.getState() == Tab.STATE_LOADING)
                    if (showProgress)
                        mBrowserToolbar.setProgressVisibility(true);
                        mBrowserToolbar.setProgressVisibility(true);
                }
                }
                Tabs.getInstance().notifyListeners(tab, Tabs.TabEvents.START);
                Tabs.getInstance().notifyListeners(tab, Tabs.TabEvents.START);