mozilla-kde.patch
changeset 716 cef565f1c325
parent 703 c4aab80e472f
child 718 6cb1ac7cd223
equal deleted inserted replaced
715:e1c226a4de34 716:cef565f1c325
    42  
    42  
    43  #include "prefapi.h"
    43  #include "prefapi.h"
    44  #include "prefread.h"
    44  #include "prefread.h"
    45  #include "prefapi_private_data.h"
    45  #include "prefapi_private_data.h"
    46  
    46  
    47 @@ -1115,16 +1116,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
    47 @@ -1113,16 +1114,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
    48  
    48  
    49  static nsresult pref_LoadPrefsInDirList(const char *listId)
    49  static nsresult pref_LoadPrefsInDirList(const char *listId)
    50  {
    50  {
    51    nsresult rv;
    51    nsresult rv;
    52    nsCOMPtr<nsIProperties> dirSvc(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
    52    nsCOMPtr<nsIProperties> dirSvc(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
    60 +#endif
    60 +#endif
    61 +  };
    61 +  };
    62 +
    62 +
    63 +  if (nsKDEUtils::kdeSession()) {
    63 +  if (nsKDEUtils::kdeSession()) {
    64 +    for(int i = 0;
    64 +    for(int i = 0;
    65 +        i < NS_ARRAY_LENGTH(specialFiles);
    65 +        i < MOZ_ARRAY_LENGTH(specialFiles);
    66 +        ++i ) {
    66 +        ++i ) {
    67 +      if (*specialFiles[ i ] == '\0') {
    67 +      if (*specialFiles[ i ] == '\0') {
    68 +        specialFiles[ i ] = "kde.js";
    68 +        specialFiles[ i ] = "kde.js";
    69 +        break;
    69 +        break;
    70 +      }
    70 +      }
    77                getter_AddRefs(list));
    77                getter_AddRefs(list));
    78    if (!list)
    78    if (!list)
    79      return NS_OK;
    79      return NS_OK;
    80  
    80  
    81    bool hasMore;
    81    bool hasMore;
    82 @@ -1140,17 +1159,17 @@ static nsresult pref_LoadPrefsInDirList(
    82 @@ -1138,17 +1157,17 @@ static nsresult pref_LoadPrefsInDirList(
    83  
    83  
    84      nsAutoCString leaf;
    84      nsAutoCString leaf;
    85      path->GetNativeLeafName(leaf);
    85      path->GetNativeLeafName(leaf);
    86  
    86  
    87      // Do we care if a file provided by this process fails to load?
    87      // Do we care if a file provided by this process fails to load?
    88      if (Substring(leaf, leaf.Length() - 4).Equals(NS_LITERAL_CSTRING(".xpi")))
    88      if (Substring(leaf, leaf.Length() - 4).Equals(NS_LITERAL_CSTRING(".xpi")))
    89        ReadExtensionPrefs(path);
    89        ReadExtensionPrefs(path);
    90      else
    90      else
    91 -      pref_LoadPrefsInDir(path, nullptr, 0);
    91 -      pref_LoadPrefsInDir(path, nullptr, 0);
    92 +      pref_LoadPrefsInDir(path, specialFiles, NS_ARRAY_LENGTH(specialFiles));
    92 +      pref_LoadPrefsInDir(path, specialFiles, MOZ_ARRAY_LENGTH(specialFiles));
    93    }
    93    }
    94    return NS_OK;
    94    return NS_OK;
    95  }
    95  }
    96  
    96  
    97  static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name)
    97  static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name)
    98  {
    98  {
    99    nsZipItemPtr<char> manifest(jarReader, name, true);
    99    nsZipItemPtr<char> manifest(jarReader, name, true);
   100    NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
   100    NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
   101 @@ -1244,28 +1263,40 @@ static nsresult pref_InitInitialObjects(
   101 @@ -1242,28 +1261,40 @@ static nsresult pref_InitInitialObjects(
   102    /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
   102    /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
   103    static const char* specialFiles[] = {
   103    static const char* specialFiles[] = {
   104  #if defined(XP_MACOSX)
   104  #if defined(XP_MACOSX)
   105      "macprefs.js"
   105      "macprefs.js"
   106  #elif defined(XP_WIN)
   106  #elif defined(XP_WIN)
   120  #endif
   120  #endif
   121    };
   121    };
   122  
   122  
   123 +  if(nsKDEUtils::kdeSession()) { // TODO what if some setup actually requires the helper?
   123 +  if(nsKDEUtils::kdeSession()) { // TODO what if some setup actually requires the helper?
   124 +    for(int i = 0;
   124 +    for(int i = 0;
   125 +        i < NS_ARRAY_LENGTH(specialFiles);
   125 +        i < MOZ_ARRAY_LENGTH(specialFiles);
   126 +        ++i ) {
   126 +        ++i ) {
   127 +      if( *specialFiles[ i ] == '\0' ) {
   127 +      if( *specialFiles[ i ] == '\0' ) {
   128 +        specialFiles[ i ] = "kde.js";
   128 +        specialFiles[ i ] = "kde.js";
   129 +        break;
   129 +        break;
   130 +      }
   130 +      }
   268        if (fileURL &&
   268        if (fileURL &&
   269            NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) &&
   269            NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) &&
   270 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
   270 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
   271 --- a/toolkit/content/jar.mn
   271 --- a/toolkit/content/jar.mn
   272 +++ b/toolkit/content/jar.mn
   272 +++ b/toolkit/content/jar.mn
   273 @@ -53,29 +53,33 @@ toolkit.jar:
   273 @@ -55,29 +55,33 @@ toolkit.jar:
   274     content/global/viewZoomOverlay.js          (viewZoomOverlay.js)
   274     content/global/viewZoomOverlay.js          (viewZoomOverlay.js)
   275  *+ content/global/bindings/autocomplete.xml    (widgets/autocomplete.xml)
   275  *+ content/global/bindings/autocomplete.xml    (widgets/autocomplete.xml)
   276     content/global/bindings/browser.xml         (widgets/browser.xml)
   276     content/global/bindings/browser.xml         (widgets/browser.xml)
   277     content/global/bindings/button.xml          (widgets/button.xml)
   277     content/global/bindings/button.xml          (widgets/button.xml)
   278     content/global/bindings/checkbox.xml        (widgets/checkbox.xml)
   278     content/global/bindings/checkbox.xml        (widgets/checkbox.xml)
   762 +</bindings>
   762 +</bindings>
   763 diff --git a/toolkit/content/widgets/preferences-kde.xml b/toolkit/content/widgets/preferences-kde.xml
   763 diff --git a/toolkit/content/widgets/preferences-kde.xml b/toolkit/content/widgets/preferences-kde.xml
   764 new file mode 100644
   764 new file mode 100644
   765 --- /dev/null
   765 --- /dev/null
   766 +++ b/toolkit/content/widgets/preferences-kde.xml
   766 +++ b/toolkit/content/widgets/preferences-kde.xml
   767 @@ -0,0 +1,1332 @@
   767 @@ -0,0 +1,1334 @@
   768 +<?xml version="1.0"?>
   768 +<?xml version="1.0"?>
   769 +
   769 +
   770 +<!DOCTYPE bindings [
   770 +<!DOCTYPE bindings [
   771 +  <!ENTITY % preferencesDTD SYSTEM "chrome://global/locale/preferences.dtd">
   771 +  <!ENTITY % preferencesDTD SYSTEM "chrome://global/locale/preferences.dtd">
   772 +  %preferencesDTD;
   772 +  %preferencesDTD;
  1348 +        <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/>
  1348 +        <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/>
  1349 +        <xul:spacer anonid="spacer" flex="1"/>
  1349 +        <xul:spacer anonid="spacer" flex="1"/>
  1350 +        <xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/>
  1350 +        <xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/>
  1351 +        <xul:button dlgtype="accept" class="dialog-button" icon="accept"/>
  1351 +        <xul:button dlgtype="accept" class="dialog-button" icon="accept"/>
  1352 +#elif XP_UNIX
  1352 +#elif XP_UNIX
  1353 +	        pack="end">
  1353 +                pack="end">
  1354 +        <xul:button dlgtype="help" class="dialog-button" hidden="true" icon="help"/>
  1354 +	<xul:button dlgtype="help" class="dialog-button" hidden="true" icon="help"/>
  1355 +        <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
  1355 +	<xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
  1356 +        <xul:spacer anonid="spacer" flex="1"/>
  1356 +	<xul:spacer anonid="spacer" flex="1"/>
  1357 +        <xul:button dlgtype="accept" class="dialog-button" icon="accept"/>
  1357 +	<xul:button dlgtype="accept" class="dialog-button" icon="accept"/>
  1358 +        <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/>
  1358 +	<xul:button dlgtype="extra1" class="dialog-button" hidden="true"/>
  1359 +        <xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/>
  1359 +	<xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/>
  1360 +        <xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/>
  1360 +	<xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/>
  1361 +	
       
  1362 +#else
  1361 +#else
  1363 +                pack="end">
  1362 +                pack="end">
  1364 +        <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
  1363 +        <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
  1365 +        <xul:spacer anonid="spacer" flex="1"/>
  1364 +        <xul:spacer anonid="spacer" flex="1"/>
  1366 +        <xul:button dlgtype="accept" class="dialog-button" icon="accept"/>
  1365 +        <xul:button dlgtype="accept" class="dialog-button" icon="accept"/>
  1806 +      </method>
  1805 +      </method>
  1807 +    </implementation>
  1806 +    </implementation>
  1808 +    <handlers>
  1807 +    <handlers>
  1809 +      <handler event="dialogaccept">
  1808 +      <handler event="dialogaccept">
  1810 +      <![CDATA[
  1809 +      <![CDATA[
  1811 +        if (!this._fireEvent("beforeaccept", this)) 
  1810 +        if (!this._fireEvent("beforeaccept", this)){
  1812 +          return;
  1811 +          return false;
  1813 +        
  1812 +        }
       
  1813 +
  1814 +        if (this.type == "child" && window.opener) {
  1814 +        if (this.type == "child" && window.opener) {
  1815 +          var psvc = Components.classes["@mozilla.org/preferences-service;1"]
  1815 +          var psvc = Components.classes["@mozilla.org/preferences-service;1"]
  1816 +                               .getService(Components.interfaces.nsIPrefBranch);
  1816 +                               .getService(Components.interfaces.nsIPrefBranch);
  1817 +          var instantApply = psvc.getBoolPref("browser.preferences.instantApply");
  1817 +          var instantApply = psvc.getBoolPref("browser.preferences.instantApply");
  1818 +          if (instantApply) {
  1818 +          if (instantApply) {
  1871 +
  1871 +
  1872 +          var psvc = Components.classes["@mozilla.org/preferences-service;1"]
  1872 +          var psvc = Components.classes["@mozilla.org/preferences-service;1"]
  1873 +                               .getService(Components.interfaces.nsIPrefService);
  1873 +                               .getService(Components.interfaces.nsIPrefService);
  1874 +          psvc.savePrefFile(null);
  1874 +          psvc.savePrefFile(null);
  1875 +        }
  1875 +        }
       
  1876 +
       
  1877 +        return true;
  1876 +      ]]>
  1878 +      ]]>
  1877 +      </handler>
  1879 +      </handler>
  1878 +      <handler event="command">
  1880 +      <handler event="command">
  1879 +        if (event.originalTarget.hasAttribute("pane")) {
  1881 +        if (event.originalTarget.hasAttribute("pane")) {
  1880 +          var pane = document.getElementById(event.originalTarget.getAttribute("pane"));
  1882 +          var pane = document.getElementById(event.originalTarget.getAttribute("pane"));
  2615 diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in
  2617 diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in
  2616 --- a/uriloader/exthandler/Makefile.in
  2618 --- a/uriloader/exthandler/Makefile.in
  2617 +++ b/uriloader/exthandler/Makefile.in
  2619 +++ b/uriloader/exthandler/Makefile.in
  2618 @@ -19,9 +19,10 @@ endif
  2620 @@ -19,9 +19,10 @@ endif
  2619  ifdef MOZ_ENABLE_DBUS
  2621  ifdef MOZ_ENABLE_DBUS
  2620  LOCAL_INCLUDES   += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS)
  2622  OS_INCLUDES   += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS)
  2621  endif
  2623  endif
  2622  
  2624  
  2623  include $(topsrcdir)/config/rules.mk
  2625  include $(topsrcdir)/config/rules.mk
  2624  
  2626  
  2625  ifneq (,$(filter qt gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT)))
  2627  ifneq (,$(filter qt gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT)))
  3027  #else
  3029  #else
  3028    return NS_ERROR_NOT_AVAILABLE;
  3030    return NS_ERROR_NOT_AVAILABLE;
  3029  #endif
  3031  #endif
  3030  }
  3032  }
  3031  
  3033  
  3032  nsresult nsOSHelperAppService::GetFileTokenForPath(const PRUnichar * platformAppPath, nsIFile ** aFile)
  3034  nsresult nsOSHelperAppService::GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile)
  3033  {
  3035  {
  3034 @@ -1263,17 +1263,17 @@ nsOSHelperAppService::GetFromExtension(c
  3036 @@ -1263,17 +1263,17 @@ nsOSHelperAppService::GetFromExtension(c
  3035                                           mime_types_description,
  3037                                           mime_types_description,
  3036                                           true);
  3038                                           true);
  3037  
  3039  
  3070  
  3072  
  3071    // Now look up our extensions
  3073    // Now look up our extensions
  3072 diff --git a/widget/gtk/Makefile.in b/widget/gtk/Makefile.in
  3074 diff --git a/widget/gtk/Makefile.in b/widget/gtk/Makefile.in
  3073 --- a/widget/gtk/Makefile.in
  3075 --- a/widget/gtk/Makefile.in
  3074 +++ b/widget/gtk/Makefile.in
  3076 +++ b/widget/gtk/Makefile.in
  3075 @@ -4,11 +4,13 @@
  3077 @@ -3,11 +3,13 @@
       
  3078  # License, v. 2.0. If a copy of the MPL was not distributed with this
  3076  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  3079  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  3077  
  3080  
  3078  include $(topsrcdir)/config/rules.mk
  3081  include $(topsrcdir)/config/rules.mk
  3079  
  3082  
  3080  CFLAGS          += $(MOZ_STARTUP_NOTIFICATION_CFLAGS)
  3083  CFLAGS          += $(MOZ_STARTUP_NOTIFICATION_CFLAGS)
  3081  CXXFLAGS        += $(MOZ_CAIRO_CFLAGS) $(MOZ_PIXMAN_CFLAGS) \
  3084  CXXFLAGS        += $(MOZ_CAIRO_CFLAGS) $(MOZ_STARTUP_NOTIFICATION_CFLAGS)
  3082  		               $(MOZ_STARTUP_NOTIFICATION_CFLAGS)
       
  3083  
  3085  
  3084 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
  3086 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
  3085 +
  3087 +
  3086  CFLAGS          += $(TK_CFLAGS)
  3088  CFLAGS          += $(TK_CFLAGS)
  3087  CXXFLAGS        += $(TK_CFLAGS)
  3089  CXXFLAGS        += $(TK_CFLAGS)
  3450 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
  3452 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
  3451  endif
  3453  endif
  3452 diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp
  3454 diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp
  3453 --- a/xpcom/components/ManifestParser.cpp
  3455 --- a/xpcom/components/ManifestParser.cpp
  3454 +++ b/xpcom/components/ManifestParser.cpp
  3456 +++ b/xpcom/components/ManifestParser.cpp
  3455 @@ -30,16 +30,17 @@
  3457 @@ -31,16 +31,17 @@
  3456  #include "nsTextFormatter.h"
  3458  #include "nsTextFormatter.h"
  3457  #include "nsVersionComparator.h"
  3459  #include "nsVersionComparator.h"
  3458  #include "nsXPCOMCIDInternal.h"
  3460  #include "nsXPCOMCIDInternal.h"
  3459  
  3461  
  3460  #include "nsIConsoleService.h"
  3462  #include "nsIConsoleService.h"
  3468  struct ManifestDirective
  3470  struct ManifestDirective
  3469  {
  3471  {
  3470    const char* directive;
  3472    const char* directive;
  3471    int argc;
  3473    int argc;
  3472  
  3474  
  3473 @@ -397,16 +398,17 @@ ParseManifest(NSLocationType type, FileL
  3475 @@ -398,16 +399,17 @@ ParseManifest(NSLocationType type, FileL
  3474    NS_NAMED_LITERAL_STRING(kPlatform, "platform");
  3476    NS_NAMED_LITERAL_STRING(kPlatform, "platform");
  3475    NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible");
  3477    NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible");
  3476    NS_NAMED_LITERAL_STRING(kApplication, "application");
  3478    NS_NAMED_LITERAL_STRING(kApplication, "application");
  3477    NS_NAMED_LITERAL_STRING(kAppVersion, "appversion");
  3479    NS_NAMED_LITERAL_STRING(kAppVersion, "appversion");
  3478    NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion");
  3480    NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion");
  3486  
  3488  
  3487    // Obsolete
  3489    // Obsolete
  3488    NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers");
  3490    NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers");
  3489  
  3491  
  3490    nsAutoString appID;
  3492    nsAutoString appID;
  3491 @@ -444,41 +446,46 @@ ParseManifest(NSLocationType type, FileL
  3493 @@ -445,42 +447,47 @@ ParseManifest(NSLocationType type, FileL
  3492          CopyUTF8toUTF16(s, abi);
  3494          CopyUTF8toUTF16(s, abi);
  3493          abi.Insert(PRUnichar('_'), 0);
  3495          abi.Insert(char16_t('_'), 0);
  3494          abi.Insert(osTarget, 0);
  3496          abi.Insert(osTarget, 0);
  3495        }
  3497        }
  3496      }
  3498      }
  3497    }
  3499    }
  3498  
  3500  
  3499    nsAutoString osVersion;
  3501    nsAutoString osVersion;
  3500 +  nsAutoString desktop;
  3502 +  nsAutoString desktop;
  3501  #if defined(XP_WIN)
  3503  #if defined(XP_WIN)
       
  3504  #pragma warning(push)
       
  3505  #pragma warning(disable:4996) // VC12+ deprecates GetVersionEx
  3502    OSVERSIONINFO info = { sizeof(OSVERSIONINFO) };
  3506    OSVERSIONINFO info = { sizeof(OSVERSIONINFO) };
  3503    if (GetVersionEx(&info)) {
  3507    if (GetVersionEx(&info)) {
  3504      nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
  3508      nsTextFormatter::ssprintf(osVersion, MOZ_UTF16("%ld.%ld"),
  3505                                           info.dwMajorVersion,
  3509                                           info.dwMajorVersion,
  3506                                           info.dwMinorVersion);
  3510                                           info.dwMinorVersion);
  3507    }
  3511    }
  3508 +  desktop = NS_LITERAL_STRING("win");
  3512 +  desktop = NS_LITERAL_STRING("win");
       
  3513  #pragma warning(pop)
  3509  #elif defined(MOZ_WIDGET_COCOA)
  3514  #elif defined(MOZ_WIDGET_COCOA)
  3510    SInt32 majorVersion, minorVersion;
  3515    SInt32 majorVersion = nsCocoaFeatures::OSXVersionMajor();
  3511    if ((Gestalt(gestaltSystemVersionMajor, &majorVersion) == noErr) &&
  3516    SInt32 minorVersion = nsCocoaFeatures::OSXVersionMinor();
  3512        (Gestalt(gestaltSystemVersionMinor, &minorVersion) == noErr)) {
  3517    nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
  3513      nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
  3518                                         majorVersion,
  3514                                           majorVersion,
  3519                                         minorVersion);
  3515                                           minorVersion);
       
  3516    }
       
  3517 +  desktop = NS_LITERAL_STRING("macosx");
  3520 +  desktop = NS_LITERAL_STRING("macosx");
  3518  #elif defined(MOZ_WIDGET_GTK)
  3521  #elif defined(MOZ_WIDGET_GTK)
  3519    nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
  3522    nsTextFormatter::ssprintf(osVersion, MOZ_UTF16("%ld.%ld"),
  3520                                         gtk_major_version,
  3523                                         gtk_major_version,
  3521                                         gtk_minor_version);
  3524                                         gtk_minor_version);
  3522 +  desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome");
  3525 +  desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome");
  3523  #elif defined(MOZ_WIDGET_ANDROID)
  3526  #elif defined(MOZ_WIDGET_ANDROID)
  3524    bool isTablet = false;
  3527    bool isTablet = false;
  3533    // at the end.
  3536    // at the end.
  3534    nsTArray<CachedDirective> contracts;
  3537    nsTArray<CachedDirective> contracts;
  3535  
  3538  
  3536    char *token;
  3539    char *token;
  3537    char *newline = buf;
  3540    char *newline = buf;
  3538 @@ -560,24 +567,26 @@ ParseManifest(NSLocationType type, FileL
  3541 @@ -562,24 +569,26 @@ ParseManifest(NSLocationType type, FileL
  3539      TriState stOsVersion = eUnspecified;
  3542      TriState stOsVersion = eUnspecified;
  3540      TriState stOs = eUnspecified;
  3543      TriState stOs = eUnspecified;
  3541      TriState stABI = eUnspecified;
  3544      TriState stABI = eUnspecified;
  3542  #if defined(MOZ_WIDGET_ANDROID)
  3545  #if defined(MOZ_WIDGET_ANDROID)
  3543      TriState stTablet = eUnspecified;
  3546      TriState stTablet = eUnspecified;
  3560          continue;
  3563          continue;
  3561  
  3564  
  3562  #if defined(MOZ_WIDGET_ANDROID)
  3565  #if defined(MOZ_WIDGET_ANDROID)
  3563        bool tablet = false;
  3566        bool tablet = false;
  3564        if (CheckFlag(kTablet, wtoken, tablet)) {
  3567        if (CheckFlag(kTablet, wtoken, tablet)) {
  3565 @@ -606,16 +615,17 @@ ParseManifest(NSLocationType type, FileL
  3568 @@ -608,16 +617,17 @@ ParseManifest(NSLocationType type, FileL
  3566      }
  3569      }
  3567  
  3570  
  3568      if (!ok ||
  3571      if (!ok ||
  3569          stApp == eBad ||
  3572          stApp == eBad ||
  3570          stAppVersion == eBad ||
  3573          stAppVersion == eBad ||