Bug 738938 - Progress throbber shows again when loading about:home on startup r=blassey
authorMark Finkle <mfinkle@mozilla.com>
Mon, 09 Apr 2012 16:03:30 -0400
changeset 91261 423e8d6463ffbede66da24a70a0ecba9ba9c3348
parent 91260 f0f385e9f904ab2f5605ad646bcc41e55ae72a88
child 91262 d4e09a9ed76ce187ba8bc16c1d03bd2bbbd99555
push id22433
push usereakhgari@mozilla.com
push dateTue, 10 Apr 2012 15:11:59 +0000
treeherdermozilla-central@3fa30b0edd15 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs738938
milestone14.0a1
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
Bug 738938 - Progress throbber shows again when loading about:home on startup r=blassey
mobile/android/base/Tab.java
--- a/mobile/android/base/Tab.java
+++ b/mobile/android/base/Tab.java
@@ -120,17 +120,17 @@ public final class Tab {
         mHistoryIndex = -1;
         mBookmark = false;
         mDoorHangers = new HashMap<String, DoorHanger>();
         mFaviconLoadId = 0;
         mDocumentURI = "";
         mContentType = "";
         mPluginViews = new ArrayList<View>();
         mPluginLayers = new HashMap<Surface, Layer>();
-        mState = STATE_LOADING;
+        setState(STATE_LOADING);
         mContentResolver = Tabs.getInstance().getContentResolver();
         mContentObserver = new ContentObserver(GeckoAppShell.getHandler()) {
             public void onChange(boolean selfChange) {
                 updateBookmark();
             }
         };
         BrowserDB.registerBookmarkObserver(mContentResolver, mContentObserver);
     }
@@ -319,17 +319,21 @@ public final class Tab {
                 }
             });
         } else {
             Log.e(LOGTAG, "Requested title update on empty history stack");
         }
     }
 
     public void setState(int state) {
-        mState = state;
+        // Pages implemented in Java are not bound by Gecko state
+        if ("about:home".equals(mUrl))
+            mState = STATE_SUCCESS;
+        else
+            mState = state;
     }
 
     public int getState() {
         return mState;
     }
 
     public void setHasTouchListeners(boolean aValue) {
         mHasTouchListeners = aValue;