From 9ba3ec0ba25341f06d26f055349a4542a0c0f881 Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Fri, 10 Jul 2015 08:39:38 +0200 Subject: [PATCH] Backed out changeset 9fac75be77b7 (bug 1175005) --- widget/cocoa/GfxInfo.h | 2 -- widget/cocoa/GfxInfo.mm | 27 --------------------------- 2 files changed, 29 deletions(-) diff --git a/widget/cocoa/GfxInfo.h b/widget/cocoa/GfxInfo.h index 7c2bf7b398f..01b72d81fe9 100644 --- a/widget/cocoa/GfxInfo.h +++ b/widget/cocoa/GfxInfo.h @@ -59,8 +59,6 @@ public: virtual uint32_t OperatingSystemVersion() override { return mOSXVersion; } - nsresult FindMonitors(JSContext* cx, JS::HandleObject array) override; - protected: virtual ~GfxInfo() {} diff --git a/widget/cocoa/GfxInfo.mm b/widget/cocoa/GfxInfo.mm index d3e8aaa552c..ddb35ea12b3 100644 --- a/widget/cocoa/GfxInfo.mm +++ b/widget/cocoa/GfxInfo.mm @@ -379,33 +379,6 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, &os); } -nsresult -GfxInfo::FindMonitors(JSContext* aCx, JS::HandleObject aOutArray) -{ - // Getting the refresh rate is a little hard on OS X. We could use - // CVDisplayLinkGetNominalOutputVideoRefreshPeriod, but that's a little - // involved. Ideally we could query it from vsync. For now, we leave it out. - int32_t deviceCount = 0; - for (NSScreen* screen in [NSScreen screens]) { - NSRect rect = [screen frame]; - - JS::Rooted obj(aCx, JS_NewPlainObject(aCx)); - - JS::Rooted screenWidth(aCx, JS::Int32Value((int)rect.size.width)); - JS_SetProperty(aCx, obj, "screenWidth", screenWidth); - - JS::Rooted screenHeight(aCx, JS::Int32Value((int)rect.size.height)); - JS_SetProperty(aCx, obj, "screenHeight", screenHeight); - - JS::Rooted scale(aCx, JS::NumberValue(nsCocoaUtils::GetBackingScaleFactor(screen))); - JS_SetProperty(aCx, obj, "scale", scale); - - JS::Rooted element(aCx, JS::ObjectValue(*obj)); - JS_SetElement(aCx, aOutArray, deviceCount++, element); - } - return NS_OK; -} - #ifdef DEBUG // Implement nsIGfxInfoDebug