Bug 785758 - Always update security and reader modes after progress visibility (r=mfinkle)
authorLucas Rocha <lucasr@mozilla.com>
Mon, 27 Aug 2012 00:45:07 +0100
changeset 105547 9c6cebe4aa59d4c75f6fe013ae26137715133045
parent 105546 1c013be9911e51315e0f55f39306fb6e2fea5134
child 105548 8af6a22827ecaffe6328a02633411da0421ccb90
child 105549 469f4e91bb5da42ed59803c2a9bf74007e233b21
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersmfinkle
bugs785758
milestone17.0a1
Bug 785758 - Always update security and reader modes after progress visibility (r=mfinkle)
mobile/android/base/BrowserToolbar.java
--- a/mobile/android/base/BrowserToolbar.java
+++ b/mobile/android/base/BrowserToolbar.java
@@ -321,23 +321,23 @@ public class BrowserToolbar implements V
         switch(msg) {
             case TITLE:
                 if (Tabs.getInstance().isSelectedTab(tab)) {
                     setTitle(tab.getDisplayTitle());
                 }
                 break;
             case START:
                 if (Tabs.getInstance().isSelectedTab(tab)) {
-                    setSecurityMode(tab.getSecurityMode());
-                    setReaderMode(tab.getReaderEnabled());
                     updateBackButton(tab.canDoBack());
                     updateForwardButton(tab.canDoForward());
                     Boolean showProgress = (Boolean)data;
                     if (showProgress && tab.getState() == Tab.STATE_LOADING)
                         setProgressVisibility(true);
+                    setSecurityMode(tab.getSecurityMode());
+                    setReaderMode(tab.getReaderEnabled());
                 }
                 break;
             case STOP:
                 if (Tabs.getInstance().isSelectedTab(tab)) {
                     updateBackButton(tab.canDoBack());
                     updateForwardButton(tab.canDoForward());
                     setProgressVisibility(false);
                 }
@@ -637,19 +637,19 @@ public class BrowserToolbar implements V
     }
 
     public void refresh() {
         Tab tab = Tabs.getInstance().getSelectedTab();
         if (tab != null) {
             String url = tab.getURL();
             setTitle(tab.getDisplayTitle());
             setFavicon(tab.getFavicon());
+            setProgressVisibility(tab.getState() == Tab.STATE_LOADING);
             setSecurityMode(tab.getSecurityMode());
             setReaderMode(tab.getReaderEnabled());
-            setProgressVisibility(tab.getState() == Tab.STATE_LOADING);
             setShadowVisibility((url == null) || !url.startsWith("about:"));
             updateTabCount(Tabs.getInstance().getCount());
             updateBackButton(tab.canDoBack());
             updateForwardButton(tab.canDoForward());
         }
     }
 
     public void destroy() {