bug 591327 - Remove .extra UA pref, add UI for .compatMode.firefox and turn it on by default, r=IanN sr=Neil a=seamonkey-council (default setting confirmed with committee vote)
authorRobert Kaiser <kairo@kairo.at>
Wed, 08 Sep 2010 02:32:32 +0200
changeset 6333 c8b0e716441eac2e2dc736391522526b64d8f353
parent 6332 1d94b3afbf36d19c23cbe87679943eea84315478
child 6334 1a3e8f417e50babac8f0262f46384cf87185952b
push idunknown
push userunknown
push dateunknown
reviewersIanN, Neil, seamonkey-council
bugs591327
bug 591327 - Remove .extra UA pref, add UI for .compatMode.firefox and turn it on by default, r=IanN sr=Neil a=seamonkey-council (default setting confirmed with committee vote)
suite/browser/browser-prefs.js
suite/common/pref/pref-http.xul
suite/locales/en-US/chrome/common/help/cs_nav_prefs_advanced.xhtml
suite/locales/en-US/chrome/common/pref/pref-http.dtd
--- a/suite/browser/browser-prefs.js
+++ b/suite/browser/browser-prefs.js
@@ -58,17 +58,17 @@ pref("general.startup.compose",         
 pref("general.startup.addressbook",         false);
 
 pref("general.open_location.last_url",      "");
 pref("general.open_location.last_window_choice", 0);
 
 pref("general.smoothScroll", false);
 pref("general.autoScroll", true);
 
-#expand pref("general.useragent.extra.__MOZ_APP_NAME__", "__MOZ_APP_DISPLAYNAME__/__MOZ_APP_VERSION__");
+pref("general.useragent.compatMode.firefox", true);
 
 // 0 = blank, 1 = home (browser.startup.homepage), 2 = last
 pref("browser.startup.page",                1);
 pref("browser.startup.homepage",	   "chrome://navigator-region/locale/region.properties");
 pref("browser.startup.homepage.count", 1);
 
 pref("browser.warnOnQuit", true);
 pref("browser.warnOnRestart", true);
--- a/suite/common/pref/pref-http.xul
+++ b/suite/common/pref/pref-http.xul
@@ -64,16 +64,19 @@
                   onchange="CheckPipeliningProxy();"/>
       <preference id="network.http.proxy.keep-alive"
                   name="network.http.proxy.keep-alive"
                   type="bool"
                   onchange="CheckPipeliningProxy();"/>
       <preference id="network.http.proxy.pipelining"
                   name="network.http.proxy.pipelining"
                   type="bool"/>
+      <preference id="general.useragent.compatMode.firefox"
+                  name="general.useragent.compatMode.firefox"
+                  type="bool"/>
     </preferences>
 
     <description>&prefPara;</description>
 
     <hbox align="start">
       <groupbox flex="1">
         <caption label="&prefDirect.label;"/>
         <vbox class="indent" align="start">
@@ -126,11 +129,18 @@
                     accesskey="&prefEnablePipeliningProxy.accesskey;"
                     preference="network.http.proxy.pipelining"/>
         </vbox>
       </groupbox>
     </hbox>
 
     <description>&prefPipeWarning;</description>
 
+    <groupbox>
+      <caption label="&prefUseragent.label;"/>
+      <checkbox id="uaFirefoxCompat"
+                label="&prefFirefoxCompat.label;"
+                accesskey="&prefFirefoxCompat.accesskey;"
+                preference="general.useragent.compatMode.firefox"/>
+    </groupbox>
   </prefpane>
 
 </overlay>
--- a/suite/locales/en-US/chrome/common/help/cs_nav_prefs_advanced.xhtml
+++ b/suite/locales/en-US/chrome/common/help/cs_nav_prefs_advanced.xhtml
@@ -344,16 +344,27 @@
       <li><strong>Enable Pipelining</strong>: Select this to
         enable pipelining, which allows for more than one HTTP request to be
         sent to the server at once, reducing delays loading web pages.
 
         <p><strong>Note</strong>: Pipelining is only available with 
           HTTP 1.1.</p></li>
     </ul>
   </li>
+  <li><strong>User Agent String</strong>:
+    The identifier sent by &brandShortName; to all websites is used for
+    statistics about website usage but also sometimes to expose certain features
+    only to known browsers (a practice known as "sniffing").
+    <ul>
+      <li><strong>Advertize Firefox compatibility</strong>: If this is enabled,
+        &brandShortName; will identify itself as both &brandShortName; and also
+        compatible with Firefox. This allows websites that check for certain
+        browsers rather than certain functionality to work with &brandShortName;.</li>
+    </ul>
+  </li>
 </ul>
 
 <p>[<a href="#advanced_preferences">Return to beginning of section</a>]</p>
 
 <h2 id="software_installation">Advanced Preferences - Software
   Installation</h2>
 
 <p>This section describes how to use the Software Installation preferences
--- a/suite/locales/en-US/chrome/common/pref/pref-http.dtd
+++ b/suite/locales/en-US/chrome/common/pref/pref-http.dtd
@@ -12,8 +12,11 @@
 <!ENTITY prefEnableKeepAlive.label           "Enable Keep-Alive">
 <!ENTITY prefEnableKeepAlive.accesskey       "K">
 <!ENTITY prefEnableKeepAliveProxy.accesskey  "A">
 <!ENTITY prefEnablePipelining.label          "Enable Pipelining">
 <!ENTITY prefEnablePipelining.accesskey      "P">
 <!ENTITY prefEnablePipeliningProxy.accesskey "N">
 <!ENTITY prefPara                            "HTTP connections may be fine-tuned using these options to enhance either performance or compatibility. Some proxy servers, for example, are known to require HTTP/1.0 (see the release notes for details).">
 <!ENTITY prefPipeWarning                     "WARNING: pipelining is an experimental feature, designed to improve page-load performance, that is unfortunately not well supported by some web servers and proxies.">
+<!ENTITY prefUseragent.label                 "User Agent String">
+<!ENTITY prefFirefoxCompat.label             "Advertize Firefox compatibility">
+<!ENTITY prefFirefoxCompat.accesskey         "F">