Bug 795307 - commit backout
authorJim Mathies <jmathies@mozilla.com>
Fri, 28 Sep 2012 16:18:18 -0500
changeset 108545 843439877db37d33462325ea9b9ad36e455b34e0
parent 108543 5fbf17bdec328ce842c0fdcb8e327b3324a411a6 (current diff)
parent 108544 f569fa9e32ae0f82ddff04aa499b833286b4ae4f (diff)
child 108546 28e5dc43792122c765f532b58155599f29462d7a
push id23566
push userphilringnalda@gmail.com
push dateSat, 29 Sep 2012 05:10:54 +0000
treeherdermozilla-central@c09a0c022b2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs795307
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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: