зеркало из https://github.com/mozilla/gecko-dev.git
merge the last green changeset on m-c to fx-team
This commit is contained in:
Коммит
aacbcf5f6e
|
@ -980,28 +980,35 @@ nsAttrValue::SetIntValueAndType(PRInt32 aValue, ValueType aType,
|
|||
}
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsAttrValue::GetEnumTableIndex(const EnumTable* aTable, PRInt16& aResult)
|
||||
PRInt16
|
||||
nsAttrValue::GetEnumTableIndex(const EnumTable* aTable)
|
||||
{
|
||||
PRInt16 index = sEnumTableArray->IndexOf(aTable);
|
||||
if (index < 0) {
|
||||
index = sEnumTableArray->Length();
|
||||
NS_ASSERTION(index <= NS_ATTRVALUE_ENUMTABLEINDEX_MAXVALUE,
|
||||
"too many enum tables");
|
||||
if (!sEnumTableArray->AppendElement(aTable)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
sEnumTableArray->AppendElement(aTable);
|
||||
}
|
||||
|
||||
aResult = index;
|
||||
return index;
|
||||
}
|
||||
|
||||
return PR_TRUE;
|
||||
PRInt32
|
||||
nsAttrValue::EnumTableEntryToValue(const EnumTable* aEnumTable,
|
||||
const EnumTable* aTableEntry)
|
||||
{
|
||||
PRInt16 index = GetEnumTableIndex(aEnumTable);
|
||||
PRInt32 value = (aTableEntry->value << NS_ATTRVALUE_ENUMTABLEINDEX_BITS) +
|
||||
index;
|
||||
return value;
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsAttrValue::ParseEnumValue(const nsAString& aValue,
|
||||
const EnumTable* aTable,
|
||||
PRBool aCaseSensitive)
|
||||
PRBool aCaseSensitive,
|
||||
const EnumTable* aDefaultValue)
|
||||
{
|
||||
ResetIfSet();
|
||||
const EnumTable* tableEntry = aTable;
|
||||
|
@ -1009,13 +1016,7 @@ nsAttrValue::ParseEnumValue(const nsAString& aValue,
|
|||
while (tableEntry->tag) {
|
||||
if (aCaseSensitive ? aValue.EqualsASCII(tableEntry->tag) :
|
||||
aValue.LowerCaseEqualsASCII(tableEntry->tag)) {
|
||||
PRInt16 index;
|
||||
if (!GetEnumTableIndex(aTable, index)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
PRInt32 value = (tableEntry->value << NS_ATTRVALUE_ENUMTABLEINDEX_BITS) +
|
||||
index;
|
||||
PRInt32 value = EnumTableEntryToValue(aTable, tableEntry);
|
||||
|
||||
PRBool equals = aCaseSensitive || aValue.EqualsASCII(tableEntry->tag);
|
||||
if (!equals) {
|
||||
|
@ -1035,6 +1036,14 @@ nsAttrValue::ParseEnumValue(const nsAString& aValue,
|
|||
tableEntry++;
|
||||
}
|
||||
|
||||
if (aDefaultValue) {
|
||||
NS_PRECONDITION(aTable <= aDefaultValue && aDefaultValue < tableEntry,
|
||||
"aDefaultValue not inside aTable?");
|
||||
SetIntValueAndType(EnumTableEntryToValue(aTable, aDefaultValue),
|
||||
eEnum, &aValue);
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -213,11 +213,15 @@ public:
|
|||
* @param aValue the string to find the value for
|
||||
* @param aTable the enumeration to map with
|
||||
* @param aCaseSensitive specify if the parsing has to be case sensitive
|
||||
* @param aDefaultValue if non-null, this function will always return true.
|
||||
* Failure to parse aValue as one of the values in aTable will just
|
||||
* cause aDefaultValue->value to be stored as the enumeration value.
|
||||
* @return whether the enum value was found or not
|
||||
*/
|
||||
PRBool ParseEnumValue(const nsAString& aValue,
|
||||
const EnumTable* aTable,
|
||||
PRBool aCaseSensitive);
|
||||
PRBool aCaseSensitive,
|
||||
const EnumTable* aDefaultValue = nsnull);
|
||||
|
||||
/**
|
||||
* Parse a string into an integer. Can optionally parse percent (n%).
|
||||
|
@ -347,13 +351,11 @@ private:
|
|||
/**
|
||||
* Get the index of an EnumTable in the sEnumTableArray.
|
||||
* If the EnumTable is not in the sEnumTableArray, it is added.
|
||||
* If there is no more space in sEnumTableArray, it returns PR_FALSE.
|
||||
*
|
||||
* @param aTable the EnumTable to get the index of.
|
||||
* @param aResult the index of the EnumTable.
|
||||
* @return whether the index has been found or inserted.
|
||||
* @return the index of the EnumTable.
|
||||
*/
|
||||
PRBool GetEnumTableIndex(const EnumTable* aTable, PRInt16& aResult);
|
||||
PRInt16 GetEnumTableIndex(const EnumTable* aTable);
|
||||
|
||||
inline void SetPtrValueAndType(void* aValue, ValueBaseType aType);
|
||||
void SetIntValueAndType(PRInt32 aValue, ValueType aType,
|
||||
|
@ -377,6 +379,10 @@ private:
|
|||
PRInt32* aErrorCode,
|
||||
PRBool aCanBePercent = PR_FALSE,
|
||||
PRBool* aIsPercent = nsnull) const;
|
||||
// Given an enum table and a particular entry in that table, return
|
||||
// the actual integer value we should store.
|
||||
PRInt32 EnumTableEntryToValue(const EnumTable* aEnumTable,
|
||||
const EnumTable* aTableEntry);
|
||||
|
||||
static nsTArray<const EnumTable*, nsTArrayDefaultAllocator>* sEnumTableArray;
|
||||
|
||||
|
|
|
@ -35,8 +35,14 @@
|
|||
function testTexture(url, crossOriginAttribute, expected_result) {
|
||||
number_of_tests_live++;
|
||||
var image = new Image();
|
||||
if (crossOriginAttribute != "leave-default-crossOrigin-attribute")
|
||||
if (crossOriginAttribute == "just-crossOrigin-without-value") {
|
||||
var div = document.createElement('div');
|
||||
div.innerHTML="<img crossOrigin>";
|
||||
image = div.children[0];
|
||||
}
|
||||
else if (crossOriginAttribute != "missing-value-default")
|
||||
image.crossOrigin = crossOriginAttribute;
|
||||
|
||||
|
||||
function testDone() {
|
||||
number_of_tests_live--;
|
||||
|
@ -77,27 +83,35 @@
|
|||
return;
|
||||
}
|
||||
|
||||
testTexture("http://mochi.test:8888/tests/content/canvas/test/webgl/crossorigin/image.png",
|
||||
"leave-default-crossOrigin-attribute",
|
||||
OK);
|
||||
|
||||
testTexture("http://mochi.test:8888/tests/content/canvas/test/webgl/crossorigin/image.png",
|
||||
"missing-value-default",
|
||||
OK);
|
||||
testTexture("http://mochi.test:8888/tests/content/canvas/test/webgl/crossorigin/image.png",
|
||||
"",
|
||||
OK);
|
||||
|
||||
testTexture("http://mochi.test:8888/tests/content/canvas/test/webgl/crossorigin/image.png",
|
||||
"just-crossOrigin-without-value",
|
||||
OK);
|
||||
testTexture("http://example.com/tests/content/canvas/test/webgl/crossorigin/image.png",
|
||||
"leave-default-crossOrigin-attribute",
|
||||
"missing-value-default",
|
||||
SECURITY_ERR);
|
||||
testTexture("http://example.com/tests/content/canvas/test/webgl/crossorigin/image.png",
|
||||
"",
|
||||
SECURITY_ERR);
|
||||
testTexture("http://example.com/tests/content/canvas/test/webgl/crossorigin/image.png",
|
||||
"just-crossOrigin-without-value",
|
||||
SECURITY_ERR);
|
||||
|
||||
testTexture("http://example.com/tests/content/canvas/test/webgl/crossorigin/image-allow-star.png",
|
||||
"leave-default-crossOrigin-attribute",
|
||||
"missing-value-default",
|
||||
SECURITY_ERR);
|
||||
testTexture("http://example.com/tests/content/canvas/test/webgl/crossorigin/image-allow-star.png",
|
||||
"",
|
||||
SECURITY_ERR);
|
||||
OK);
|
||||
testTexture("http://example.com/tests/content/canvas/test/webgl/crossorigin/image-allow-star.png",
|
||||
"just-crossOrigin-without-value",
|
||||
OK);
|
||||
testTexture("http://example.com/tests/content/canvas/test/webgl/crossorigin/image-allow-star.png",
|
||||
"anonymous",
|
||||
OK);
|
||||
|
@ -106,11 +120,14 @@
|
|||
SECURITY_ERR);
|
||||
|
||||
testTexture("http://example.com/tests/content/canvas/test/webgl/crossorigin/image-allow-credentials.png",
|
||||
"leave-default-crossOrigin-attribute",
|
||||
"missing-value-default",
|
||||
SECURITY_ERR);
|
||||
testTexture("http://example.com/tests/content/canvas/test/webgl/crossorigin/image-allow-credentials.png",
|
||||
"",
|
||||
SECURITY_ERR);
|
||||
OK);
|
||||
testTexture("http://example.com/tests/content/canvas/test/webgl/crossorigin/image-allow-credentials.png",
|
||||
"just-crossOrigin-without-value",
|
||||
OK);
|
||||
testTexture("http://example.com/tests/content/canvas/test/webgl/crossorigin/image-allow-credentials.png",
|
||||
"anonymous",
|
||||
OK);
|
||||
|
@ -118,7 +135,7 @@
|
|||
"use-credentials",
|
||||
OK);
|
||||
|
||||
// Test that bad values for crossorigin="..." are interpreted as default.
|
||||
// Test that bad values for crossorigin="..." are interpreted as invalid-value-default which is "anonymous".
|
||||
testTexture("http://mochi.test:8888/tests/content/canvas/test/webgl/crossorigin/image.png",
|
||||
"foobar",
|
||||
OK);
|
||||
|
@ -127,10 +144,10 @@
|
|||
SECURITY_ERR);
|
||||
testTexture("http://example.com/tests/content/canvas/test/webgl/crossorigin/image-allow-star.png",
|
||||
"foobar",
|
||||
SECURITY_ERR);
|
||||
OK);
|
||||
testTexture("http://example.com/tests/content/canvas/test/webgl/crossorigin/image-allow-credentials.png",
|
||||
"foobar",
|
||||
SECURITY_ERR);
|
||||
OK);
|
||||
|
||||
all_tests_started = true;
|
||||
});
|
||||
|
|
|
@ -141,10 +141,6 @@
|
|||
|
||||
#ifdef XP_MACOSX
|
||||
#import <ApplicationServices/ApplicationServices.h>
|
||||
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
#include "nsCocoaFeatures.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
|
@ -377,7 +373,6 @@ public:
|
|||
static void OnEvent(nsEvent* aEvent);
|
||||
static void Shutdown();
|
||||
static PRUint32 GetTimeoutTime();
|
||||
static PRUint32 GetGestureTimeoutTime();
|
||||
static PRInt32 AccelerateWheelDelta(PRInt32 aScrollLines,
|
||||
PRBool aIsHorizontal, PRBool aAllowScrollSpeedOverride,
|
||||
nsIScrollableFrame::ScrollUnit *aScrollQuantity,
|
||||
|
@ -387,10 +382,6 @@ public:
|
|||
enum {
|
||||
kScrollSeriesTimeout = 80
|
||||
};
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
static PRBool GetGestureTriggered();
|
||||
static void SetGestureTriggered();
|
||||
#endif
|
||||
protected:
|
||||
static nsIntPoint GetScreenPoint(nsGUIEvent* aEvent);
|
||||
static void OnFailToScrollTarget();
|
||||
|
@ -411,9 +402,6 @@ protected:
|
|||
static PRUint32 sMouseMoved; // in milliseconds
|
||||
static nsITimer* sTimer;
|
||||
static PRInt32 sScrollSeriesCounter;
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
static PRUint32 sGestureTriggered; // in milliseconds
|
||||
#endif
|
||||
};
|
||||
|
||||
nsWeakFrame nsMouseWheelTransaction::sTargetFrame(nsnull);
|
||||
|
@ -421,9 +409,6 @@ PRUint32 nsMouseWheelTransaction::sTime = 0;
|
|||
PRUint32 nsMouseWheelTransaction::sMouseMoved = 0;
|
||||
nsITimer* nsMouseWheelTransaction::sTimer = nsnull;
|
||||
PRInt32 nsMouseWheelTransaction::sScrollSeriesCounter = 0;
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
PRUint32 nsMouseWheelTransaction::sGestureTriggered = 0;
|
||||
#endif
|
||||
|
||||
static PRBool
|
||||
OutOfTime(PRUint32 aBaseTime, PRUint32 aThreshold)
|
||||
|
@ -502,29 +487,8 @@ nsMouseWheelTransaction::EndTransaction()
|
|||
sTimer->Cancel();
|
||||
sTargetFrame = nsnull;
|
||||
sScrollSeriesCounter = 0;
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
sGestureTriggered = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
void
|
||||
nsMouseWheelTransaction::SetGestureTriggered() {
|
||||
sGestureTriggered = PR_IntervalToMilliseconds(PR_IntervalNow());
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsMouseWheelTransaction::GetGestureTriggered() {
|
||||
if (sGestureTriggered != 0 &&
|
||||
OutOfTime(sGestureTriggered, GetGestureTimeoutTime())) {
|
||||
// Start accepting new gestures
|
||||
sGestureTriggered = 0;
|
||||
}
|
||||
|
||||
return sGestureTriggered != 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
nsMouseWheelTransaction::OnEvent(nsEvent* aEvent)
|
||||
{
|
||||
|
@ -670,12 +634,6 @@ nsMouseWheelTransaction::GetScreenPoint(nsGUIEvent* aEvent)
|
|||
return aEvent->refPoint + aEvent->widget->WidgetToScreenOffset();
|
||||
}
|
||||
|
||||
PRUint32
|
||||
nsMouseWheelTransaction::GetGestureTimeoutTime()
|
||||
{
|
||||
return Preferences::GetUint("mousewheel.transaction.gesturetimeout", 300);
|
||||
}
|
||||
|
||||
PRUint32
|
||||
nsMouseWheelTransaction::GetTimeoutTime()
|
||||
{
|
||||
|
@ -2839,22 +2797,6 @@ nsEventStateManager::DoScrollText(nsIFrame* aTargetFrame,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
// On lion scroll will trigger back/forward at the edge of the page
|
||||
if (isHorizontal && passToParent && nsCocoaFeatures::OnLionOrLater()) {
|
||||
if (!nsMouseWheelTransaction::GetGestureTriggered()) {
|
||||
if (numLines > 4 || numLines < -4) {
|
||||
DoScrollHistory(-numLines);
|
||||
nsMouseWheelTransaction::SetGestureTriggered();
|
||||
return NS_OK;
|
||||
}
|
||||
} else {
|
||||
// Extend the gesture in progress
|
||||
nsMouseWheelTransaction::SetGestureTriggered();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!passToParent && frameToScroll) {
|
||||
if (aScrollQuantity == nsIScrollableFrame::LINES) {
|
||||
// When this is called for querying the scroll target information,
|
||||
|
|
|
@ -228,15 +228,15 @@ NS_IMPL_STRING_ATTR(nsHTMLImageElement, UseMap, usemap)
|
|||
NS_IMPL_INT_ATTR(nsHTMLImageElement, Vspace, vspace)
|
||||
|
||||
static const nsAttrValue::EnumTable kCrossOriginTable[] = {
|
||||
{ "", nsImageLoadingContent::CORS_NONE },
|
||||
// Order matters here; see ParseAttribute
|
||||
{ "anonymous", nsImageLoadingContent::CORS_ANONYMOUS },
|
||||
{ "use-credentials", nsImageLoadingContent::CORS_USE_CREDENTIALS },
|
||||
{ 0 }
|
||||
};
|
||||
// Default crossOrigin mode is CORS_NONE.
|
||||
static const nsAttrValue::EnumTable* kCrossOriginDefault = &kCrossOriginTable[0];
|
||||
|
||||
NS_IMPL_ENUM_ATTR_DEFAULT_VALUE(nsHTMLImageElement, CrossOrigin, crossorigin, kCrossOriginDefault->tag)
|
||||
// crossorigin is not "limited to only known values" per spec, so it's
|
||||
// just a string attr purposes of the DOM crossOrigin property.
|
||||
NS_IMPL_STRING_ATTR(nsHTMLImageElement, CrossOrigin, crossorigin)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLImageElement::GetDraggable(PRBool* aDraggable)
|
||||
|
@ -352,7 +352,10 @@ nsHTMLImageElement::ParseAttribute(PRInt32 aNamespaceID,
|
|||
return ParseAlignValue(aValue, aResult);
|
||||
}
|
||||
if (aAttribute == nsGkAtoms::crossorigin) {
|
||||
return aResult.ParseEnumValue(aValue, kCrossOriginTable, PR_FALSE);
|
||||
return aResult.ParseEnumValue(aValue, kCrossOriginTable, PR_FALSE,
|
||||
// default value is anonymous if aValue is
|
||||
// not a value we understand
|
||||
&kCrossOriginTable[0]);
|
||||
}
|
||||
if (ParseImageAttribute(aAttribute, aValue, aResult)) {
|
||||
return PR_TRUE;
|
||||
|
@ -656,7 +659,9 @@ nsHTMLImageElement::GetCORSMode()
|
|||
nsImageLoadingContent::CORSMode ret = nsImageLoadingContent::CORS_NONE;
|
||||
|
||||
const nsAttrValue* value = GetParsedAttr(nsGkAtoms::crossorigin);
|
||||
if (value && value->Type() == nsAttrValue::eEnum) {
|
||||
if (value) {
|
||||
NS_ASSERTION(value->Type() == nsAttrValue::eEnum,
|
||||
"Why is this not an enum value?");
|
||||
ret = (nsImageLoadingContent::CORSMode) value->GetEnumValue();
|
||||
}
|
||||
|
||||
|
|
|
@ -18,12 +18,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=664299
|
|||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
/** Test to ensure we reflect <img crossorigin> correctly **/
|
||||
reflectLimitedEnumerated({
|
||||
reflectString({
|
||||
element: new Image(),
|
||||
attribute: "crossOrigin",
|
||||
validValues: [ "", "anonymous", "use-credentials" ],
|
||||
invalidValues: [ "foobar" ],
|
||||
defaultValue: "" });
|
||||
otherValues: [ "", "anonymous", "ANONYMOUS", " aNOnYmous ",
|
||||
"use-credentials", "USE-CREDENTIALS", " UsE-CreDEntIALS ",
|
||||
"foobar", "FOOBAR", " fOoBaR " ]});
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
|
|
|
@ -247,15 +247,6 @@ function populateGraphicsSection() {
|
|||
pushInfoRow(trGraphics, "driverDate", gfxInfo.adapterDriverDate);
|
||||
|
||||
#ifdef XP_WIN
|
||||
pushInfoRow(trGraphics, "adapterDescription2", gfxInfo.adapterDescription2);
|
||||
pushInfoRow(trGraphics, "adapterVendorID2", hexValueToString(gfxInfo.adapterVendorID2));
|
||||
pushInfoRow(trGraphics, "adapterDeviceID2", hexValueToString(gfxInfo.adapterDeviceID2));
|
||||
pushInfoRow(trGraphics, "adapterRAM2", gfxInfo.adapterRAM2);
|
||||
pushInfoRow(trGraphics, "adapterDrivers2", gfxInfo.adapterDriver2);
|
||||
pushInfoRow(trGraphics, "driverVersion2", gfxInfo.adapterDriverVersion2);
|
||||
pushInfoRow(trGraphics, "driverDate2", gfxInfo.adapterDriverDate2);
|
||||
pushInfoRow(trGraphics, "isGPU2Active", gfxInfo.isGPU2Active);
|
||||
|
||||
var version = Cc["@mozilla.org/system-info;1"]
|
||||
.getService(Ci.nsIPropertyBag2)
|
||||
.getProperty("version");
|
||||
|
|
|
@ -31,12 +31,4 @@ adapterDrivers = Adapter Drivers
|
|||
adapterRAM = Adapter RAM
|
||||
driverVersion = Driver Version
|
||||
driverDate = Driver Date
|
||||
adapterDescription2 = Adapter Description (GPU #2)
|
||||
adapterVendorID2 = Vendor ID (GPU #2)
|
||||
adapterDeviceID2 = Device ID (GPU #2)
|
||||
adapterDrivers2 = Adapter Drivers (GPU #2)
|
||||
adapterRAM2 = Adapter RAM (GPU #2)
|
||||
driverVersion2 = Driver Version (GPU #2)
|
||||
driverDate2 = Driver Date (GPU #2)
|
||||
isGPU2Active = GPU #2 Active
|
||||
webglRenderer = WebGL Renderer
|
||||
|
|
|
@ -1560,6 +1560,13 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
nsSimpleGestureEvent(const nsSimpleGestureEvent& other)
|
||||
: nsMouseEvent_base((other.flags & NS_EVENT_FLAG_TRUSTED) != 0,
|
||||
other.message, other.widget, NS_SIMPLE_GESTURE_EVENT),
|
||||
direction(other.direction), delta(other.delta)
|
||||
{
|
||||
}
|
||||
|
||||
PRUint32 direction; // See nsIDOMSimpleGestureEvent for values
|
||||
PRFloat64 delta; // Delta for magnify and rotate events
|
||||
};
|
||||
|
|
|
@ -51,38 +51,27 @@ interface nsIGfxInfo : nsISupports
|
|||
readonly attribute boolean AzureEnabled;
|
||||
readonly attribute DOMString DWriteVersion;
|
||||
readonly attribute DOMString cleartypeParameters;
|
||||
|
||||
// XXX: Switch to a list of devices, rather than explicitly numbering them.
|
||||
|
||||
|
||||
/**
|
||||
* The name of the display adapter.
|
||||
*/
|
||||
readonly attribute DOMString adapterDescription;
|
||||
readonly attribute DOMString adapterDescription2;
|
||||
|
||||
readonly attribute DOMString adapterDriver;
|
||||
readonly attribute DOMString adapterDriver2;
|
||||
|
||||
/* These types are inspired by DXGI_ADAPTER_DESC */
|
||||
readonly attribute unsigned long adapterVendorID;
|
||||
readonly attribute unsigned long adapterVendorID2;
|
||||
|
||||
readonly attribute unsigned long adapterDeviceID;
|
||||
readonly attribute unsigned long adapterDeviceID2;
|
||||
|
||||
|
||||
/**
|
||||
* The amount of RAM in MB in the display adapter.
|
||||
*/
|
||||
readonly attribute DOMString adapterRAM;
|
||||
readonly attribute DOMString adapterRAM2;
|
||||
|
||||
readonly attribute DOMString adapterDriverVersion;
|
||||
readonly attribute DOMString adapterDriverVersion2;
|
||||
|
||||
readonly attribute DOMString adapterDriverDate;
|
||||
readonly attribute DOMString adapterDriverDate2;
|
||||
|
||||
readonly attribute boolean isGPU2Active;
|
||||
|
||||
void getFailures(
|
||||
[optional] out unsigned long failureCount,
|
||||
|
|
|
@ -111,13 +111,6 @@ GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDescription2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterRAM; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM)
|
||||
|
@ -126,13 +119,6 @@ GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterRAM2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriver; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver)
|
||||
|
@ -141,13 +127,6 @@ GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriver2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriver2(nsAString & aAdapterDriver)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverVersion; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion)
|
||||
|
@ -156,13 +135,6 @@ GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverVersion2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverDate; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate)
|
||||
|
@ -171,13 +143,6 @@ GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverDate2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterVendorID; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterVendorID(PRUint32 *aAdapterVendorID)
|
||||
|
@ -186,13 +151,6 @@ GfxInfo::GetAdapterVendorID(PRUint32 *aAdapterVendorID)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterVendorID2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterVendorID2(PRUint32 *aAdapterVendorID)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterDeviceID; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDeviceID(PRUint32 *aAdapterDeviceID)
|
||||
|
@ -201,20 +159,6 @@ GfxInfo::GetAdapterDeviceID(PRUint32 *aAdapterDeviceID)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterDeviceID2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute boolean isGPU2Active; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetIsGPU2Active(PRBool* aIsGPU2Active)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
void
|
||||
GfxInfo::AddCrashReportAnnotations()
|
||||
{
|
||||
|
|
|
@ -64,14 +64,6 @@ public:
|
|||
NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID2(PRUint32 *aAdapterVendorID);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetIsGPU2Active(PRBool *aIsGPU2Active);
|
||||
using GfxInfoBase::GetFeatureStatus;
|
||||
using GfxInfoBase::GetFeatureSuggestedDriverVersion;
|
||||
using GfxInfoBase::GetWebGLParameter;
|
||||
|
|
|
@ -64,14 +64,6 @@ public:
|
|||
NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID2(PRUint32 *aAdapterVendorID);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetIsGPU2Active(PRBool *aIsGPU2Active);
|
||||
using GfxInfoBase::GetFeatureStatus;
|
||||
using GfxInfoBase::GetFeatureSuggestedDriverVersion;
|
||||
using GfxInfoBase::GetWebGLParameter;
|
||||
|
|
|
@ -134,13 +134,6 @@ GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDescription2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterRAM; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM)
|
||||
|
@ -149,13 +142,6 @@ GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterRAM2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriver; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver)
|
||||
|
@ -164,13 +150,6 @@ GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriver2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriver2(nsAString & aAdapterDriver)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverVersion; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion)
|
||||
|
@ -179,13 +158,6 @@ GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverVersion2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverDate; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate)
|
||||
|
@ -194,13 +166,6 @@ GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverDate2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterVendorID; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterVendorID(PRUint32 *aAdapterVendorID)
|
||||
|
@ -209,13 +174,6 @@ GfxInfo::GetAdapterVendorID(PRUint32 *aAdapterVendorID)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterVendorID2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterVendorID2(PRUint32 *aAdapterVendorID)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterDeviceID; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDeviceID(PRUint32 *aAdapterDeviceID)
|
||||
|
@ -224,20 +182,6 @@ GfxInfo::GetAdapterDeviceID(PRUint32 *aAdapterDeviceID)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterDeviceID2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute boolean isGPU2Active; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetIsGPU2Active(PRBool* aIsGPU2Active)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
void
|
||||
GfxInfo::AddCrashReportAnnotations()
|
||||
{
|
||||
|
@ -321,6 +265,26 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, PRInt32* aStatus,
|
|||
if (!foundGoodDevice)
|
||||
status = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
|
||||
}
|
||||
|
||||
if (aFeature == nsIGfxInfo::FEATURE_WEBGL_OPENGL) {
|
||||
// same comment as above for FEATURE_OPENGL_LAYERS.
|
||||
bool foundGoodDevice = false;
|
||||
|
||||
for (PRUint32 i = 0; i < NS_ARRAY_LENGTH(mRendererIDs); ++i) {
|
||||
switch (mRendererIDs[i]) {
|
||||
case kCGLRendererGeForceFXID: // bug 678053. We must blacklist Geforce 7300 GT. This family
|
||||
// covers all Geforce FX, 6, 7 series. Need bug 678330 for finer
|
||||
// blacklisting.
|
||||
break;
|
||||
default:
|
||||
if (mRendererIDs[i])
|
||||
foundGoodDevice = true;
|
||||
}
|
||||
}
|
||||
if (!foundGoodDevice)
|
||||
status = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
|
||||
}
|
||||
|
||||
*aStatus = status;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -168,6 +168,49 @@ extern "C" long TSMProcessRawKeyEvent(EventRef carbonEvent);
|
|||
- (long long)_scrollPhase;
|
||||
@end
|
||||
|
||||
// The following section, required to support fluid swipe tracking on OS X 10.7
|
||||
// and up, contains defines/declarations that are only available on 10.7 and up.
|
||||
// [NSEvent trackSwipeEventWithOptions:...] also requires that the compiler
|
||||
// support "blocks"
|
||||
// (http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Blocks/Articles/00_Introduction.html)
|
||||
// -- which it does on 10.6 and up (using the 10.6 SDK or higher).
|
||||
#ifdef __LP64__
|
||||
enum {
|
||||
NSEventPhaseNone = 0,
|
||||
NSEventPhaseBegan = 0x1 << 0,
|
||||
NSEventPhaseStationary = 0x1 << 1,
|
||||
NSEventPhaseChanged = 0x1 << 2,
|
||||
NSEventPhaseEnded = 0x1 << 3,
|
||||
NSEventPhaseCancelled = 0x1 << 4,
|
||||
};
|
||||
typedef NSUInteger NSEventPhase;
|
||||
|
||||
enum {
|
||||
NSEventSwipeTrackingLockDirection = 0x1 << 0,
|
||||
NSEventSwipeTrackingClampGestureAmount = 0x1 << 1
|
||||
};
|
||||
typedef NSUInteger NSEventSwipeTrackingOptions;
|
||||
|
||||
enum {
|
||||
NSEventGestureAxisNone = 0,
|
||||
NSEventGestureAxisHorizontal,
|
||||
NSEventGestureAxisVertical
|
||||
};
|
||||
typedef NSInteger NSEventGestureAxis;
|
||||
|
||||
@interface NSEvent (FluidSwipeTracking)
|
||||
+ (BOOL)isSwipeTrackingFromScrollEventsEnabled;
|
||||
- (BOOL)hasPreciseScrollingDeltas;
|
||||
- (CGFloat)scrollingDeltaX;
|
||||
- (CGFloat)scrollingDeltaY;
|
||||
- (NSEventPhase)phase;
|
||||
- (void)trackSwipeEventWithOptions:(NSEventSwipeTrackingOptions)options
|
||||
dampenAmountThresholdMin:(CGFloat)minDampenThreshold
|
||||
max:(CGFloat)maxDampenThreshold
|
||||
usingHandler:(void (^)(CGFloat gestureAmount, NSEventPhase phase, BOOL isComplete, BOOL *stop))trackingHandler;
|
||||
@end
|
||||
#endif // #ifdef __LP64__
|
||||
|
||||
@interface ChildView : NSView<
|
||||
#ifdef ACCESSIBILITY
|
||||
mozAccessible,
|
||||
|
@ -239,6 +282,11 @@ extern "C" long TSMProcessRawKeyEvent(EventRef carbonEvent);
|
|||
float mCumulativeRotation;
|
||||
|
||||
BOOL mDidForceRefreshOpenGL;
|
||||
|
||||
// Support for fluid swipe tracking.
|
||||
#ifdef __LP64__
|
||||
BOOL *mSwipeAnimationCancelled;
|
||||
#endif
|
||||
}
|
||||
|
||||
// class initialization
|
||||
|
@ -286,6 +334,12 @@ extern "C" long TSMProcessRawKeyEvent(EventRef carbonEvent);
|
|||
- (void)magnifyWithEvent:(NSEvent *)anEvent;
|
||||
- (void)rotateWithEvent:(NSEvent *)anEvent;
|
||||
- (void)endGestureWithEvent:(NSEvent *)anEvent;
|
||||
|
||||
// Support for fluid swipe tracking.
|
||||
#ifdef __LP64__
|
||||
- (void)maybeTrackScrollEventAsSwipe:(NSEvent *)anEvent
|
||||
scrollOverflow:(PRInt32)overflow;
|
||||
#endif
|
||||
@end
|
||||
|
||||
class ChildViewMouseTracker {
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#include "prlog.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "nsChildView.h"
|
||||
#include "nsCocoaWindow.h"
|
||||
|
@ -2012,6 +2013,10 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
mDidForceRefreshOpenGL = NO;
|
||||
|
||||
[self setFocusRingType:NSFocusRingTypeNone];
|
||||
|
||||
#ifdef __LP64__
|
||||
mSwipeAnimationCancelled = nil;
|
||||
#endif
|
||||
}
|
||||
|
||||
// register for things we'll take from other applications
|
||||
|
@ -2987,6 +2992,126 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
}
|
||||
|
||||
// Support fluid swipe tracking on OS X 10.7 and higher. We must be careful
|
||||
// to only invoke this support on a horizontal two-finger gesture that really
|
||||
// is a swipe (and not a scroll) -- in other words, the app is responsible
|
||||
// for deciding which is which. But once the decision is made, the OS tracks
|
||||
// the swipe until it has finished, and decides whether or not it succeeded.
|
||||
// A swipe has the same functionality as the Back and Forward buttons. For
|
||||
// now swipe animation is unsupported (e.g. no bounces). This method is
|
||||
// partly based on Apple sample code available at
|
||||
// http://developer.apple.com/library/mac/#releasenotes/Cocoa/AppKit.html
|
||||
// (under Fluid Swipe Tracking API).
|
||||
#ifdef __LP64__
|
||||
- (void)maybeTrackScrollEventAsSwipe:(NSEvent *)anEvent
|
||||
scrollOverflow:(PRInt32)overflow
|
||||
{
|
||||
if (!nsToolkit::OnLionOrLater()) {
|
||||
return;
|
||||
}
|
||||
// This method checks whether the AppleEnableSwipeNavigateWithScrolls global
|
||||
// preference is set. If it isn't, fluid swipe tracking is disabled, and a
|
||||
// horizontal two-finger gesture is always a scroll (even in Safari). This
|
||||
// preference can't (currently) be set from the Preferences UI -- only using
|
||||
// 'defaults write'.
|
||||
if (![NSEvent isSwipeTrackingFromScrollEventsEnabled]) {
|
||||
return;
|
||||
}
|
||||
if ([anEvent type] != NSScrollWheel) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If a swipe is currently being tracked kill it -- it's been interrupted by
|
||||
// another gesture or legacy scroll wheel event.
|
||||
if (mSwipeAnimationCancelled && (*mSwipeAnimationCancelled == NO)) {
|
||||
*mSwipeAnimationCancelled = YES;
|
||||
mSwipeAnimationCancelled = nil;
|
||||
}
|
||||
|
||||
// Only initiate tracking if the user has tried to scroll past the edge of
|
||||
// the current page (as indicated by 'overflow' being non-zero). Gecko only
|
||||
// sets nsMouseScrollEvent.scrollOverflow when it's processing
|
||||
// NS_MOUSE_PIXEL_SCROLL events (not NS_MOUSE_SCROLL events).
|
||||
// nsMouseScrollEvent.scrollOverflow only indicates left or right overflow
|
||||
// for horizontal NS_MOUSE_PIXEL_SCROLL events.
|
||||
if (!overflow) {
|
||||
return;
|
||||
}
|
||||
// Only initiate tracking for gestures that have just begun -- otherwise a
|
||||
// scroll to one side of the page can have a swipe tacked on to it.
|
||||
if ([anEvent phase] != NSEventPhaseBegan) {
|
||||
return;
|
||||
}
|
||||
CGFloat deltaX, deltaY;
|
||||
if ([anEvent hasPreciseScrollingDeltas]) {
|
||||
deltaX = [anEvent scrollingDeltaX];
|
||||
deltaY = [anEvent scrollingDeltaY];
|
||||
} else {
|
||||
deltaX = [anEvent deltaX];
|
||||
deltaY = [anEvent deltaY];
|
||||
}
|
||||
// Only initiate tracking for events whose horizontal element is at least
|
||||
// eight times larger than its vertical element. This minimizes performance
|
||||
// problems with vertical scrolls (by minimizing the possibility that they'll
|
||||
// be misinterpreted as horizontal swipes), while still tolerating a small
|
||||
// vertical element to a true horizontal swipe. The number '8' was arrived
|
||||
// at by trial and error.
|
||||
if ((deltaX == 0) || (fabs(deltaX) <= fabs(deltaY) * 8)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// geckoEvent must be initialized now (while anEvent is still available),
|
||||
// but we also need to access it (and modify it) in the following "block"
|
||||
// (the trackingHandler passed to [NSEvent trackSwipeEventWithOptions:...]).
|
||||
// Normally we'd give it the '__block' keyword, but this makes the compiler
|
||||
// crash :-( Without the '__block' keyword, it becomes immutable from
|
||||
// trackingHandler. So trackingHandler must make a copy of it and modify
|
||||
// that.
|
||||
nsSimpleGestureEvent geckoEvent(PR_TRUE, NS_SIMPLE_GESTURE_SWIPE, mGeckoChild, 0, 0.0);
|
||||
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
|
||||
|
||||
__block BOOL animationCancelled = NO;
|
||||
// At this point, anEvent is the first scroll wheel event in a two-finger
|
||||
// horizontal gesture that we've decided to treat as a swipe. When we call
|
||||
// [NSEvent trackSwipeEventWithOptions:...], the OS interprets all
|
||||
// subsequent scroll wheel events that are part of this gesture as a swipe,
|
||||
// and stops sending them to us. The OS calls the trackingHandler "block"
|
||||
// multiple times, asynchronously (sometimes after [NSEvent
|
||||
// maybeTrackScrollEventAsSwipe:...] has returned). The OS determines when
|
||||
// the gesture has finished, and whether or not it was "successful" -- this
|
||||
// information is passed to trackingHandler. We must be careful to only
|
||||
// call [NSEvent maybeTrackScrollEventAsSwipe:...] on a "real" swipe --
|
||||
// otherwise two-finger scrolling performance will suffer significantly.
|
||||
[anEvent trackSwipeEventWithOptions:0
|
||||
dampenAmountThresholdMin:-1
|
||||
max:1
|
||||
usingHandler:^(CGFloat gestureAmount, NSEventPhase phase, BOOL isComplete, BOOL *stop) {
|
||||
if (animationCancelled) {
|
||||
*stop = YES;
|
||||
return;
|
||||
}
|
||||
if (isComplete) {
|
||||
if (gestureAmount) {
|
||||
nsSimpleGestureEvent geckoEventCopy(geckoEvent);
|
||||
if (gestureAmount > 0) {
|
||||
geckoEventCopy.direction |= nsIDOMSimpleGestureEvent::DIRECTION_LEFT;
|
||||
} else {
|
||||
geckoEventCopy.direction |= nsIDOMSimpleGestureEvent::DIRECTION_RIGHT;
|
||||
}
|
||||
mGeckoChild->DispatchWindowEvent(geckoEventCopy);
|
||||
}
|
||||
mSwipeAnimationCancelled = nil;
|
||||
}
|
||||
}];
|
||||
|
||||
// We keep a pointer to the __block variable (animationCanceled) so we
|
||||
// can cancel our block handler at any time. Note: We must assign
|
||||
// &animationCanceled after our block creation and copy -- its address
|
||||
// isn't resolved until then!
|
||||
mSwipeAnimationCancelled = &animationCancelled;
|
||||
}
|
||||
#endif // #ifdef __LP64__
|
||||
|
||||
// Returning NO from this method only disallows ordering on mousedown - in order
|
||||
// to prevent it for mouseup too, we need to call [NSApp preventWindowOrdering]
|
||||
// when handling the mousedown event.
|
||||
|
@ -3670,6 +3795,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
geckoEvent.delta = NSToIntRound(scrollDeltaPixels);
|
||||
nsAutoRetainCocoaObject kungFuDeathGrip(self);
|
||||
mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
#ifdef __LP64__
|
||||
// scrollOverflow tells us when the user has tried to scroll past the edge
|
||||
// of a page (in those cases it's non-zero). Gecko only sets it when
|
||||
// processing NS_MOUSE_PIXEL_SCROLL events (not MS_MOUSE_SCROLL events).
|
||||
// It only means left/right overflow when Gecko is processing a horizontal
|
||||
// event.
|
||||
if (inAxis & nsMouseScrollEvent::kIsHorizontal) {
|
||||
[self maybeTrackScrollEventAsSwipe:theEvent
|
||||
scrollOverflow:geckoEvent.scrollOverflow];
|
||||
}
|
||||
#endif // #ifdef __LP64__
|
||||
}
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
|
||||
#include <windows.h>
|
||||
#include <setupapi.h>
|
||||
#include "d3d9.h"
|
||||
#include "gfxWindowsPlatform.h"
|
||||
#include "GfxInfo.h"
|
||||
#include "GfxInfoWebGL.h"
|
||||
|
@ -78,11 +77,7 @@ static const PRUint32 vendorATI = 0x1002;
|
|||
GfxInfo::GfxInfo()
|
||||
: mAdapterVendorID(0),
|
||||
mAdapterDeviceID(0),
|
||||
mAdapterVendorID2(0),
|
||||
mAdapterDeviceID2(0),
|
||||
mWindowsVersion(0),
|
||||
mHasDualGPU(PR_FALSE),
|
||||
mIsGPU2Active(PR_FALSE)
|
||||
mWindowsVersion(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -204,42 +199,7 @@ GfxInfo::GetCleartypeParameters(nsAString & aCleartypeParams)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
typedef IDirect3D9* (WINAPI*Direct3DCreate9Func) (
|
||||
UINT SDKVersion
|
||||
);
|
||||
|
||||
// XXX: Blacklisting logic doesn't use the result of this for now. Bug #628129.
|
||||
void
|
||||
GfxInfo::IdentifyActiveDevice()
|
||||
{
|
||||
|
||||
HMODULE d3d9 = LoadLibraryW(L"d3d9.dll");
|
||||
if (!d3d9) {
|
||||
NS_WARNING("Couldn't load d3d9.dll");
|
||||
return;
|
||||
}
|
||||
|
||||
Direct3DCreate9Func d3d9Create = (Direct3DCreate9Func)
|
||||
GetProcAddress(d3d9, "Direct3DCreate9");
|
||||
if (!d3d9Create) {
|
||||
NS_WARNING("Couldn't get Direct3DCreate9 function");
|
||||
return;
|
||||
}
|
||||
|
||||
nsRefPtr<IDirect3D9> d3d9Object = dont_AddRef(d3d9Create(D3D_SDK_VERSION));;
|
||||
if (!d3d9Object) {
|
||||
NS_WARNING("Couldn't create d3d9object");
|
||||
return;
|
||||
}
|
||||
|
||||
D3DADAPTER_IDENTIFIER9 ident;
|
||||
HRESULT result = d3d9Object->GetAdapterIdentifier(D3DADAPTER_DEFAULT, 0, &ident);
|
||||
|
||||
if ((result == D3D_OK) &&
|
||||
(mAdapterVendorID2 == ident.VendorId) && (mAdapterDeviceID2 = ident.DeviceId)) {
|
||||
mIsGPU2Active = PR_TRUE;
|
||||
}
|
||||
}
|
||||
/* XXX: GfxInfo doesn't handle multiple GPUs. We should try to do that. Bug #591057 */
|
||||
|
||||
static nsresult GetKeyValue(const WCHAR* keyLocation, const WCHAR* keyName, nsAString& destString, int type)
|
||||
{
|
||||
|
@ -449,40 +409,7 @@ GfxInfo::Init()
|
|||
result = RegQueryValueExW(key, L"DriverDate", NULL, NULL, (LPBYTE)value, &dwcbData);
|
||||
if (result == ERROR_SUCCESS)
|
||||
mDriverDate = value;
|
||||
RegCloseKey(key);
|
||||
|
||||
// Check for second adapter:
|
||||
//
|
||||
// A second adapter will have the same driver key as the first adapter except for
|
||||
// the last character, where '1' will be swapped for '0' or vice-versa.
|
||||
// We know driverKey.Length() > 0 since driverKeyPre is a prefix of driverKey.
|
||||
if (driverKey[driverKey.Length()-1] == '0') {
|
||||
driverKey.SetCharAt('1', driverKey.Length()-1);
|
||||
} else {
|
||||
driverKey.SetCharAt('0', driverKey.Length()-1);
|
||||
}
|
||||
result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, driverKey.BeginReading(), 0, KEY_QUERY_VALUE, &key);
|
||||
if (result == ERROR_SUCCESS) {
|
||||
mHasDualGPU = PR_TRUE;
|
||||
mDeviceKey2 = driverKey;
|
||||
dwcbData = sizeof(value);
|
||||
result = RegQueryValueExW(key, L"DriverVersion", NULL, NULL, (LPBYTE)value, &dwcbData);
|
||||
if (result == ERROR_SUCCESS)
|
||||
mDriverVersion2 = value;
|
||||
dwcbData = sizeof(value);
|
||||
result = RegQueryValueExW(key, L"DriverDate", NULL, NULL, (LPBYTE)value, &dwcbData);
|
||||
if (result == ERROR_SUCCESS)
|
||||
mDriverDate2 = value;
|
||||
dwcbData = sizeof(value);
|
||||
result = RegQueryValueExW(key, L"Device Description", NULL, NULL, (LPBYTE)value, &dwcbData);
|
||||
if (result == ERROR_SUCCESS)
|
||||
mDeviceString2 = value;
|
||||
dwcbData = sizeof(value);
|
||||
result = RegQueryValueExW(key, L"MatchingDeviceId", NULL, NULL, (LPBYTE)value, &dwcbData);
|
||||
if (result == ERROR_SUCCESS)
|
||||
mDeviceID2 = value;
|
||||
RegCloseKey(key);
|
||||
}
|
||||
RegCloseKey(key);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -495,47 +422,6 @@ GfxInfo::Init()
|
|||
FreeLibrary(setupapi);
|
||||
}
|
||||
|
||||
nsAutoString vendor(mDeviceID);
|
||||
ToUpperCase(vendor);
|
||||
PRInt32 start = vendor.Find(NS_LITERAL_CSTRING("VEN_"));
|
||||
if (start != -1) {
|
||||
vendor.Cut(0, start + strlen("VEN_"));
|
||||
vendor.Truncate(4);
|
||||
}
|
||||
nsresult err;
|
||||
mAdapterVendorID = vendor.ToInteger(&err, 16);
|
||||
|
||||
vendor = mDeviceID2;
|
||||
ToUpperCase(vendor);
|
||||
start = vendor.Find(NS_LITERAL_CSTRING("VEN_"));
|
||||
if (start != -1) {
|
||||
vendor.Cut(0, start + strlen("VEN_"));
|
||||
vendor.Truncate(4);
|
||||
}
|
||||
mAdapterVendorID2 = vendor.ToInteger(&err, 16);
|
||||
|
||||
nsAutoString device(mDeviceID);
|
||||
ToUpperCase(device);
|
||||
start = device.Find(NS_LITERAL_CSTRING("&DEV_"));
|
||||
if (start != -1) {
|
||||
device.Cut(0, start + strlen("&DEV_"));
|
||||
device.Truncate(4);
|
||||
}
|
||||
mAdapterDeviceID = device.ToInteger(&err, 16);
|
||||
|
||||
device = mDeviceID2;
|
||||
ToUpperCase(device);
|
||||
start = device.Find(NS_LITERAL_CSTRING("&DEV_"));
|
||||
if (start != -1) {
|
||||
device.Cut(0, start + strlen("&DEV_"));
|
||||
device.Truncate(4);
|
||||
}
|
||||
mAdapterDeviceID2 = device.ToInteger(&err, 16);
|
||||
|
||||
if (mHasDualGPU) {
|
||||
IdentifyActiveDevice();
|
||||
}
|
||||
|
||||
const char *spoofedDriverVersionString = PR_GetEnv("MOZ_GFX_SPOOF_DRIVER_VERSION");
|
||||
if (spoofedDriverVersionString) {
|
||||
mDriverVersion.AssignASCII(spoofedDriverVersionString);
|
||||
|
@ -544,6 +430,16 @@ GfxInfo::Init()
|
|||
const char *spoofedVendor = PR_GetEnv("MOZ_GFX_SPOOF_VENDOR_ID");
|
||||
if (spoofedVendor) {
|
||||
PR_sscanf(spoofedVendor, "%x", &mAdapterVendorID);
|
||||
} else {
|
||||
nsAutoString vendor(mDeviceID);
|
||||
ToUpperCase(vendor);
|
||||
PRInt32 start = vendor.Find(NS_LITERAL_CSTRING("VEN_"));
|
||||
if (start != -1) {
|
||||
vendor.Cut(0, start + strlen("VEN_"));
|
||||
vendor.Truncate(4);
|
||||
}
|
||||
nsresult err;
|
||||
mAdapterVendorID = vendor.ToInteger(&err, 16);
|
||||
}
|
||||
|
||||
mHasDriverVersionMismatch = PR_FALSE;
|
||||
|
@ -572,6 +468,16 @@ GfxInfo::Init()
|
|||
const char *spoofedDevice = PR_GetEnv("MOZ_GFX_SPOOF_DEVICE_ID");
|
||||
if (spoofedDevice) {
|
||||
PR_sscanf(spoofedDevice, "%x", &mAdapterDeviceID);
|
||||
} else {
|
||||
nsAutoString device(mDeviceID);
|
||||
ToUpperCase(device);
|
||||
PRInt32 start = device.Find(NS_LITERAL_CSTRING("&DEV_"));
|
||||
if (start != -1) {
|
||||
device.Cut(0, start + strlen("&DEV_"));
|
||||
device.Truncate(4);
|
||||
}
|
||||
nsresult err;
|
||||
mAdapterDeviceID = device.ToInteger(&err, 16);
|
||||
}
|
||||
|
||||
const char *spoofedWindowsVersion = PR_GetEnv("MOZ_GFX_SPOOF_WINDOWS_VERSION");
|
||||
|
@ -594,14 +500,6 @@ GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDescription2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription)
|
||||
{
|
||||
aAdapterDescription = mDeviceString2;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterRAM; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM)
|
||||
|
@ -611,15 +509,6 @@ GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterRAM2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM)
|
||||
{
|
||||
if (NS_FAILED(GetKeyValue(mDeviceKey2.BeginReading(), L"HardwareInformation.MemorySize", aAdapterRAM, REG_DWORD)))
|
||||
aAdapterRAM = L"Unknown";
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriver; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver)
|
||||
|
@ -629,15 +518,6 @@ GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriver2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriver2(nsAString & aAdapterDriver)
|
||||
{
|
||||
if (NS_FAILED(GetKeyValue(mDeviceKey2.BeginReading(), L"InstalledDisplayDrivers", aAdapterDriver, REG_MULTI_SZ)))
|
||||
aAdapterDriver = L"Unknown";
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverVersion; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion)
|
||||
|
@ -654,22 +534,6 @@ GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverVersion2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion)
|
||||
{
|
||||
aAdapterDriverVersion = mDriverVersion2;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverDate2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate)
|
||||
{
|
||||
aAdapterDriverDate = mDriverDate2;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterVendorID; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterVendorID(PRUint32 *aAdapterVendorID)
|
||||
|
@ -678,14 +542,6 @@ GfxInfo::GetAdapterVendorID(PRUint32 *aAdapterVendorID)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterVendorID2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterVendorID2(PRUint32 *aAdapterVendorID)
|
||||
{
|
||||
*aAdapterVendorID = mAdapterVendorID2;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterDeviceID; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDeviceID(PRUint32 *aAdapterDeviceID)
|
||||
|
@ -694,22 +550,6 @@ GfxInfo::GetAdapterDeviceID(PRUint32 *aAdapterDeviceID)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterDeviceID2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID)
|
||||
{
|
||||
*aAdapterDeviceID = mAdapterDeviceID2;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute boolean isGPU2Active; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetIsGPU2Active(PRBool* aIsGPU2Active)
|
||||
{
|
||||
*aIsGPU2Active = mIsGPU2Active;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
/* Cisco's VPN software can cause corruption of the floating point state.
|
||||
* Make a note of this in our crash reports so that some weird crashes
|
||||
|
@ -767,19 +607,6 @@ GfxInfo::AddCrashReportAnnotations()
|
|||
}
|
||||
note.Append("\n");
|
||||
|
||||
if (mHasDualGPU) {
|
||||
PRUint32 deviceID2, vendorID2;
|
||||
nsAutoString adapterDriverVersionString2;
|
||||
|
||||
note.Append("Has dual GPUs. GPU #2: ");
|
||||
GetAdapterDeviceID2(&deviceID2);
|
||||
GetAdapterVendorID2(&vendorID2);
|
||||
GetAdapterDriverVersion2(adapterDriverVersionString2);
|
||||
note.AppendPrintf("AdapterVendorID2: %04x, ", vendorID2);
|
||||
note.AppendPrintf("AdapterDeviceID2: %04x, ", deviceID2);
|
||||
note.AppendPrintf("AdapterDriverVersion2: ");
|
||||
note.Append(NS_LossyConvertUTF16toASCII(adapterDriverVersionString2));
|
||||
}
|
||||
CrashReporter::AppendAppNotesToCrashReport(note);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -68,14 +68,6 @@ public:
|
|||
NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID2(PRUint32 *aAdapterVendorID);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetIsGPU2Active(PRBool *aIsGPU2Active);
|
||||
using GfxInfoBase::GetFeatureStatus;
|
||||
using GfxInfoBase::GetFeatureSuggestedDriverVersion;
|
||||
using GfxInfoBase::GetWebGLParameter;
|
||||
|
@ -94,7 +86,6 @@ protected:
|
|||
private:
|
||||
|
||||
void AddCrashReportAnnotations();
|
||||
void IdentifyActiveDevice();
|
||||
nsString mDeviceString;
|
||||
nsString mDeviceID;
|
||||
nsString mDriverVersion;
|
||||
|
@ -103,16 +94,7 @@ private:
|
|||
nsString mDeviceKeyDebug;
|
||||
PRUint32 mAdapterVendorID;
|
||||
PRUint32 mAdapterDeviceID;
|
||||
nsString mDeviceString2;
|
||||
nsString mDriverVersion2;
|
||||
nsString mDeviceID2;
|
||||
nsString mDriverDate2;
|
||||
nsString mDeviceKey2;
|
||||
PRUint32 mAdapterVendorID2;
|
||||
PRUint32 mAdapterDeviceID2;
|
||||
PRUint32 mWindowsVersion;
|
||||
PRBool mHasDualGPU;
|
||||
PRBool mIsGPU2Active;
|
||||
PRBool mHasDriverVersionMismatch;
|
||||
};
|
||||
|
||||
|
|
|
@ -343,13 +343,6 @@ GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDescription2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterRAM; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM)
|
||||
|
@ -358,13 +351,6 @@ GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterRAM2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriver; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver)
|
||||
|
@ -373,13 +359,6 @@ GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriver2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriver2(nsAString & aAdapterDriver)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverVersion; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion)
|
||||
|
@ -389,13 +368,6 @@ GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverVersion2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverDate; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate)
|
||||
|
@ -404,13 +376,6 @@ GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString adapterDriverDate2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterVendorID; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterVendorID(PRUint32 *aAdapterVendorID)
|
||||
|
@ -419,13 +384,6 @@ GfxInfo::GetAdapterVendorID(PRUint32 *aAdapterVendorID)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterVendorID2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterVendorID2(PRUint32 *aAdapterVendorID)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterDeviceID; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDeviceID(PRUint32 *aAdapterDeviceID)
|
||||
|
@ -434,20 +392,6 @@ GfxInfo::GetAdapterDeviceID(PRUint32 *aAdapterDeviceID)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long adapterDeviceID2; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute boolean isGPU2Active; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetIsGPU2Active(PRBool* aIsGPU2Active)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
} // end namespace widget
|
||||
} // end namespace mozilla
|
||||
|
|
|
@ -63,14 +63,6 @@ public:
|
|||
NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID2(PRUint32 *aAdapterVendorID);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetIsGPU2Active(PRBool *aIsGPU2Active);
|
||||
using GfxInfoBase::GetFeatureStatus;
|
||||
using GfxInfoBase::GetFeatureSuggestedDriverVersion;
|
||||
using GfxInfoBase::GetWebGLParameter;
|
||||
|
|
Загрузка…
Ссылка в новой задаче