Bug 795307 - commit backout
authorJim Mathies <jmathies@mozilla.com>
Fri, 28 Sep 2012 16:18:18 -0500
changeset 108654 843439877db37d33462325ea9b9ad36e455b34e0
parent 108652 5fbf17bdec328ce842c0fdcb8e327b3324a411a6 (current diff)
parent 108653 f569fa9e32ae0f82ddff04aa499b833286b4ae4f (diff)
child 108655 28e5dc43792122c765f532b58155599f29462d7a
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
bugs795307
milestone18.0a1
Bug 795307 - commit backout
--- a/widget/windows/nsLookAndFeel.cpp
+++ b/widget/windows/nsLookAndFeel.cpp
@@ -7,17 +7,16 @@
 #include <windows.h>
 #include <shellapi.h>
 #include "nsWindow.h"
 #include "nsStyleConsts.h"
 #include "nsUXThemeData.h"
 #include "nsUXThemeConstants.h"
 #include "gfxFont.h"
 #include "WinUtils.h"
-#include "mozilla/Telemetry.h"
 
 using namespace mozilla::widget;
 using mozilla::LookAndFeel;
 
 static nsresult GetColorFromTheme(nsUXThemeClass cls,
                            int32_t aPart,
                            int32_t aState,
                            int32_t aPropId,
@@ -34,28 +33,18 @@ static nsresult GetColorFromTheme(nsUXTh
 }
 
 static int32_t GetSystemParam(long flag, int32_t def)
 {
     DWORD value; 
     return ::SystemParametersInfo(flag, 0, &value, 0) ? value : def;
 }
 
-static int32_t IsTouchPresent()
-{
-  int32_t touchCapabilities;
-  touchCapabilities = ::GetSystemMetrics(SM_DIGITIZER);
-  return ((touchCapabilities & NID_READY) && 
-          (touchCapabilities & (NID_EXTERNAL_TOUCH | NID_INTEGRATED_TOUCH)));
-}
-
 nsLookAndFeel::nsLookAndFeel() : nsXPLookAndFeel()
 {
-  mozilla::Telemetry::Accumulate(mozilla::Telemetry::TOUCH_ENABLED_DEVICE,
-                                 IsTouchPresent());
 }
 
 nsLookAndFeel::~nsLookAndFeel()
 {
 }
 
 nsresult
 nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
@@ -371,17 +360,23 @@ nsLookAndFeel::GetIntImpl(IntID aID, int
         break;
     case eIntID_TreeScrollLinesMax:
         aResult = 3;
         break;
     case eIntID_WindowsClassic:
         aResult = !IsAppThemed();
         break;
     case eIntID_TouchEnabled:
-        aResult = IsTouchPresent();
+        aResult = 0;
+        int32_t touchCapabilities;
+        touchCapabilities = ::GetSystemMetrics(SM_DIGITIZER);
+        if ((touchCapabilities & NID_READY) && 
+           (touchCapabilities & (NID_EXTERNAL_TOUCH | NID_INTEGRATED_TOUCH))) {
+            aResult = 1;
+        }
         break;
     case eIntID_WindowsDefaultTheme:
         aResult = nsUXThemeData::IsDefaultWindowTheme();
         break;
     case eIntID_WindowsThemeIdentifier:
         aResult = nsUXThemeData::GetNativeThemeId();
         break;
     case eIntID_MacGraphiteTheme: