Bug 721317 - Port work to use Quirks mode on mac when hardware acceleration is enabled. r=Standard8
authorNomis101@web.de
Sat, 28 Jan 2012 22:51:55 +0000
changeset 9301 1cf98bececea041c2357c206a848b934ecae16cf
parent 9300 058b7f29a5b7f832cb4214c80eb7f5105ee49979
child 9302 7cf8ce4693a4e3b7ef6e62dc7788d786de64b20e
push id7120
push userbugzilla@standard8.plus.com
push dateSat, 28 Jan 2012 22:55:31 +0000
treeherdercomm-central@7cf8ce4693a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs721317
Bug 721317 - Port work to use Quirks mode on mac when hardware acceleration is enabled. r=Standard8
mail/app/macbuild/Contents/Info.plist.in
mail/app/nsMailApp.cpp
--- a/mail/app/macbuild/Contents/Info.plist.in
+++ b/mail/app/macbuild/Contents/Info.plist.in
@@ -59,16 +59,18 @@
         <string>10.5.0</string>
 	<key>LSMinimumSystemVersionByArchitecture</key>
 	<dict>
 		<key>i386</key>
 		<string>10.5.0</string>
 		<key>x86_64</key>
 		<string>10.6.0</string>
         </dict>
+        <key>NSSupportsAutomaticGraphicsSwitching</key>
+        <true/>
 	<key>UTExportedTypeDeclarations</key>
 	<array>
 		<dict>
 			<key>UTTypeIdentifier</key>
 			<string>com.mozilla.thunderbird.mozeml</string>
 			<key>UTTypeReferenceURL</key>
 			<string>http://www.mozilla.com/Thunderbird</string>
 			<key>UTTypeDescription</key>
--- a/mail/app/nsMailApp.cpp
+++ b/mail/app/nsMailApp.cpp
@@ -41,16 +41,20 @@
 #ifdef XP_WIN
 #include <windows.h>
 #include <stdlib.h>
 #elif defined(XP_UNIX)
 #include <sys/time.h>
 #include <sys/resource.h>
 #endif
 
+#ifdef XP_MACOSX
+#include "MacQuirks.h"
+#endif
+
 #include <stdio.h>
 #include <stdarg.h>
 
 #include "nsCOMPtr.h"
 #include "nsILocalFile.h"
 #include "nsStringGlue.h"
 
 #ifdef XP_WIN
@@ -144,16 +148,20 @@ static int do_main(const char *exePath, 
   XRE_FreeAppData(appData);
   return result;
 }
 
 int main(int argc, char* argv[])
 {
   char exePath[MAXPATHLEN];
 
+#ifdef XP_MACOSX
+  TriggerQuirks();
+#endif
+
   nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath);
   if (NS_FAILED(rv)) {
     Output("Couldn't calculate the application directory.\n");
     return 255;
   }
 
   char *lastSlash = strrchr(exePath, XPCOM_FILE_PATH_SEPARATOR[0]);
   if (!lastSlash || (lastSlash - exePath > MAXPATHLEN - sizeof(XPCOM_DLL) - 1))