Bug 897822 - [fig] Pages open in readermode dont display proper |Switch to Tab| info in TwoLinePageRow, r=lucasr
authorMark Capella <markcapella@twcny.rr.com>
Thu, 25 Jul 2013 08:59:44 -0400
changeset 143440 3c3c32abc33de134f2d08d1bb0e77420ed354a61
parent 143439 a9f98a5f888fcca520241c13394ff04c427f05a9
child 143441 87ed28075738caef0ee39694def5e5a7a2102035
push id25130
push userlrocha@mozilla.com
push dateWed, 21 Aug 2013 09:41:27 +0000
treeherdermozilla-central@b2486721572e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslucasr
bugs897822
milestone25.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 897822 - [fig] Pages open in readermode dont display proper |Switch to Tab| info in TwoLinePageRow, r=lucasr
mobile/android/base/Tabs.java
--- a/mobile/android/base/Tabs.java
+++ b/mobile/android/base/Tabs.java
@@ -2,16 +2,17 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko;
 
 import org.mozilla.gecko.db.BrowserDB;
 import org.mozilla.gecko.home.HomePager;
+import org.mozilla.gecko.ReaderModeUtils;
 import org.mozilla.gecko.sync.setup.SyncAccounts;
 import org.mozilla.gecko.util.GeckoEventListener;
 import org.mozilla.gecko.util.ThreadUtils;
 
 import org.json.JSONObject;
 
 import android.accounts.Account;
 import android.accounts.AccountManager;
@@ -584,17 +585,18 @@ public class Tabs implements GeckoEventL
 
     /**
      * Returns true if any of the tabs has the requested url.
      * 
      * @return true if the url is open currently, false otherwise.
      */
     public boolean hasUrl(String url) {
         for (Tab tab : mOrder) {
-            if (TextUtils.equals(tab.getURL(), url)) {
+            if (TextUtils.equals(tab.getURL(), url) ||
+                TextUtils.equals(ReaderModeUtils.getUrlFromAboutReader(tab.getURL()), url)) {
                 return true;
             }
         }
 
         return false;
     }
 
     /**