Merge mozilla-central and Places to make the orange stop.
authorShawn Wilsher <me@shawnwilsher.com>
Fri, 28 Jan 2011 14:45:24 -0800
changeset 61610 2a7a03e4d6d80b1bb7029cabb79aa9f9072e5430
parent 61609 e70226a62985a7f866e98480f9946cd02b14d35f (current diff)
parent 61576 8e01633a1a7ddf1c164669778379955933530993 (diff)
child 61611 aecb4a72e8d81d07fa00bb1e2e3ec4eafaf5f84b
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
milestone2.0b11pre
Merge mozilla-central and Places to make the orange stop.
--- a/build/automation.py.in
+++ b/build/automation.py.in
@@ -386,21 +386,16 @@ user_pref("urlclassifier.updateinterval"
 user_pref("browser.safebrowsing.provider.0.gethashURL", "http://%(server)s/safebrowsing-dummy/gethash");
 user_pref("browser.safebrowsing.provider.0.keyURL", "http://%(server)s/safebrowsing-dummy/newkey");
 user_pref("browser.safebrowsing.provider.0.updateURL", "http://%(server)s/safebrowsing-dummy/update");
 // Point update checks to the local testing server for fast failures
 user_pref("extensions.update.url", "http://%(server)s/extensions-dummy/updateURL");
 user_pref("extensions.blocklist.url", "http://%(server)s/extensions-dummy/blocklistURL");
 // Make sure opening about:addons won't hit the network
 user_pref("extensions.webservice.discoverURL", "http://%(server)s/extensions-dummy/discoveryURL");
-// no graphics driver blacklist (test slaves currently have out of date drivers that we're
-// otherwise going to blacklist)
-user_pref("gfx.direct2d.force-enabled", true);
-user_pref("layers.acceleration.force-enabled", true);
-user_pref("webgl.force-enabled", true);
 """ % { "server" : self.webServer + ":" + str(self.httpPort) }
     prefs.append(part)
 
     if useServerLocations == False:
       part = """
 user_pref("capability.principal.codebase.p1.granted",
           "UniversalXPConnect UniversalBrowserRead UniversalBrowserWrite \
            UniversalPreferencesRead UniversalPreferencesWrite \
--- a/widget/src/windows/GfxInfo.cpp
+++ b/widget/src/windows/GfxInfo.cpp
@@ -62,21 +62,16 @@ using namespace mozilla::widget;
 NS_IMPL_ISUPPORTS_INHERITED1(GfxInfo, GfxInfoBase, nsIGfxInfoDebug)
 #endif
 
 static const PRUint32 allWindowsVersions = 0xffffffff;
 static const PRUint64 allDriverVersions = 0xffffffffffffffffULL;
 
 static const PRUint32 vendorIntel = 0x8086;
 
-static const PRUint32 vendorNVIDIA = 0x10de;
-
-static const PRUint32 vendorAMD = 0x1022;
-static const PRUint32 vendorATI = 0x1002;
-
 #define V(a,b,c,d) GFX_DRIVER_VERSION(a,b,c,d)
 
 
 GfxInfo::GfxInfo()
   : mAdapterVendorID(0),
     mAdapterDeviceID(0),
     mWindowsVersion(0)
 {
@@ -595,37 +590,16 @@ static const PRUint32 deviceFamilyIntelG
 };
 
 static const GfxDriverInfo gDriverInfo[] = {
   /*
    * Notice that the first match defines the result. So always implement special cases firsts and general case last.
    */
 
   /*
-   * NVIDIA entries
-   */
-  GfxDriverInfo( DRIVER_OS_ALL,
-    vendorNVIDIA, GfxDriverInfo::allDevices,
-    GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
-    DRIVER_LESS_THAN, V(8,17,12,5721), "257.21" ),
-
-  /*
-   * AMD/ATI entries
-   */
-  GfxDriverInfo( DRIVER_OS_ALL,
-    vendorATI, GfxDriverInfo::allDevices,
-    GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
-    DRIVER_LESS_THAN, V(8,741,0,0), "10.6" ),
-  GfxDriverInfo( DRIVER_OS_ALL,
-    vendorAMD, GfxDriverInfo::allDevices,
-    GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
-    DRIVER_LESS_THAN, V(8,741,0,0), "10.6" ),
-
-
-  /*
    * Intel entries
    */
 
   /*
    * Implement special Direct2D blocklist from bug 595364
    */
   GfxDriverInfo( DRIVER_OS_ALL,
     vendorIntel, (GfxDeviceFamily) deviceFamilyIntelBlockDirect2D,
@@ -717,30 +691,23 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aF
   nsAutoString adapterDriverVersionString;
   if (NS_FAILED(GetAdapterVendorID(&adapterVendor)) ||
       NS_FAILED(GetAdapterDeviceID(&adapterDeviceID)) ||
       NS_FAILED(GetAdapterDriverVersion(adapterDriverVersionString)))
   {
     return NS_ERROR_FAILURE;
   }
 
-  if (adapterVendor != vendorIntel &&
-      adapterVendor != vendorNVIDIA &&
-      adapterVendor != vendorAMD &&
-      adapterVendor != vendorATI)
-  {
-    *aStatus = FEATURE_BLOCKED_DEVICE;
-    return NS_OK;
-  }
-
   PRUint64 driverVersion;
   if (!ParseDriverVersion(adapterDriverVersionString, &driverVersion)) {
     return NS_ERROR_FAILURE;
   }
   
+  PRUint64 suggestedDriverVersion = 0;
+
   if (aFeature == FEATURE_DIRECT3D_9_LAYERS &&
       mWindowsVersion < gfxWindowsPlatform::kWindowsXP)
   {
     *aStatus = FEATURE_BLOCKED_OS_VERSION;
     return NS_OK;
   }
 
   OperatingSystem os = WindowsVersionToOperatingSystem(mWindowsVersion);
@@ -791,16 +758,17 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aF
         }
     }
 
     bool match = false;
 
     switch (info->mComparisonOp) {
     case DRIVER_LESS_THAN:
       match = driverVersion < info->mDriverVersion;
+      suggestedDriverVersion = info->mDriverVersion;
       break;
     case DRIVER_LESS_THAN_OR_EQUAL:
       match = driverVersion <= info->mDriverVersion;
       break;
     case DRIVER_GREATER_THAN:
       match = driverVersion > info->mDriverVersion;
       break;
     case DRIVER_GREATER_THAN_OR_EQUAL:
@@ -835,28 +803,22 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aF
       }
     }
 
     info++;
   }
 
   *aStatus = status;
 
-  if (status == FEATURE_BLOCKED_DRIVER_VERSION) {
-      if (info->mSuggestedVersion) {
-          aSuggestedDriverVersion.AppendPrintf("%s", info->mSuggestedVersion);
-      } else if (info->mComparisonOp == DRIVER_LESS_THAN &&
-                 info->mDriverVersion != allDriverVersions)
-      {
-          aSuggestedDriverVersion.AppendPrintf("%lld.%lld.%lld.%lld",
-                                               (info->mDriverVersion & 0xffff000000000000) >> 48,
-                                               (info->mDriverVersion & 0x0000ffff00000000) >> 32,
-                                               (info->mDriverVersion & 0x00000000ffff0000) >> 16,
-                                               (info->mDriverVersion & 0x000000000000ffff));
-      }
+  if (status == FEATURE_BLOCKED_DRIVER_VERSION && suggestedDriverVersion) {
+      aSuggestedDriverVersion.AppendPrintf("%lld.%lld.%lld.%lld",
+                                           (suggestedDriverVersion & 0xffff000000000000) >> 48,
+                                           (suggestedDriverVersion & 0x0000ffff00000000) >> 32,
+                                           (suggestedDriverVersion & 0x00000000ffff0000) >> 16,
+                                           (suggestedDriverVersion & 0x000000000000ffff));
   }
   
   return NS_OK;
 }
 
 #ifdef DEBUG
 
 // Implement nsIGfxInfoDebug
--- a/widget/src/xpwidgets/GfxDriverInfo.cpp
+++ b/widget/src/xpwidgets/GfxDriverInfo.cpp
@@ -48,48 +48,44 @@ GfxDriverInfo::GfxDriverInfo()
   : mOperatingSystem(DRIVER_OS_UNKNOWN),
     mAdapterVendor(allAdapterVendors),
     mDevices(allDevices),
     mDeleteDevices(false),
     mFeature(allFeatures),
     mFeatureStatus(nsIGfxInfo::FEATURE_NO_INFO),
     mComparisonOp(DRIVER_UNKNOWN_COMPARISON),
     mDriverVersion(0),
-    mDriverVersionMax(0),
-    mSuggestedVersion(nsnull)
+    mDriverVersionMax(0)
 {}
 
 GfxDriverInfo::GfxDriverInfo(OperatingSystem os, PRUint32 vendor,
                              GfxDeviceFamily devices,
                              PRInt32 feature, PRInt32 featureStatus,
                              VersionComparisonOp op,
                              PRUint64 driverVersion,
-                             const char *suggestedVersion /* = nsnull */,
                              bool ownDevices /* = false */)
   : mOperatingSystem(os),
     mAdapterVendor(vendor),
     mDevices(devices),
     mDeleteDevices(ownDevices),
     mFeature(feature),
     mFeatureStatus(featureStatus),
     mComparisonOp(op),
     mDriverVersion(driverVersion),
-    mDriverVersionMax(0),
-    mSuggestedVersion(suggestedVersion)
+    mDriverVersionMax(0)
 {}
 
 GfxDriverInfo::GfxDriverInfo(const GfxDriverInfo& aOrig)
   : mOperatingSystem(aOrig.mOperatingSystem),
     mAdapterVendor(aOrig.mAdapterVendor),
     mFeature(aOrig.mFeature),
     mFeatureStatus(aOrig.mFeatureStatus),
     mComparisonOp(aOrig.mComparisonOp),
     mDriverVersion(aOrig.mDriverVersion),
-    mDriverVersionMax(aOrig.mDriverVersionMax),
-    mSuggestedVersion(aOrig.mSuggestedVersion)
+    mDriverVersionMax(aOrig.mDriverVersionMax)
 {
   // If we're managing the lifetime of the devices array, we have to make a
   // copy of the original's array.
   if (aOrig.mDeleteDevices) {
     PRUint32 count = 0;
     const PRUint32 *device = aOrig.mDevices;
     while (*device) {
       count++;
--- a/widget/src/xpwidgets/GfxDriverInfo.h
+++ b/widget/src/xpwidgets/GfxDriverInfo.h
@@ -74,18 +74,17 @@ enum VersionComparisonOp {
 typedef PRUint32 *GfxDeviceFamily;
 
 struct GfxDriverInfo
 {
   // If |ownDevices| is true, you are transferring ownership of the devices
   // array, and it will be deleted when this GfxDriverInfo is destroyed.
   GfxDriverInfo(OperatingSystem os, PRUint32 vendor, GfxDeviceFamily devices,
                 PRInt32 feature, PRInt32 featureStatus, VersionComparisonOp op,
-                PRUint64 driverVersion, const char *suggestedVersion = nsnull,
-                bool ownDevices = false);
+                PRUint64 driverVersion, bool ownDevices = false);
 
   GfxDriverInfo();
   GfxDriverInfo(const GfxDriverInfo&);
   ~GfxDriverInfo();
 
   OperatingSystem mOperatingSystem;
 
   PRUint32 mAdapterVendor;
@@ -105,18 +104,16 @@ struct GfxDriverInfo
   /* A feature status from nsIGfxInfo */
   PRInt32 mFeatureStatus;
 
   VersionComparisonOp mComparisonOp;
 
   /* versions are assumed to be A.B.C.D packed as 0xAAAABBBBCCCCDDDD */
   PRUint64 mDriverVersion;
   PRUint64 mDriverVersionMax;
-
-  const char *mSuggestedVersion;
 };
 
 #define GFX_DRIVER_VERSION(a,b,c,d) \
   ((PRUint64(a)<<48) | (PRUint64(b)<<32) | (PRUint64(c)<<16) | PRUint64(d))
 
 inline bool
 ParseDriverVersion(nsAString& aVersion, PRUint64 *aNumericVersion)
 {