зеркало из https://github.com/mozilla/gecko-dev.git
Bug 652814 - Rename nsIDOMTouchPoint to nsIDOMTouch (and a *aRetVal = nsnull for bug 648573 comment 19), r=mbrubeck
This commit is contained in:
Родитель
66ada9b2d0
Коммит
d0724bd5cc
|
@ -8338,21 +8338,21 @@ nsDocument::CreateTouch(nsIDOMAbstractView* aView,
|
|||
PRInt32 aRadiusY,
|
||||
float aRotationAngle,
|
||||
float aForce,
|
||||
nsIDOMTouchPoint** aRetVal)
|
||||
nsIDOMTouch** aRetVal)
|
||||
{
|
||||
NS_ADDREF(*aRetVal = new nsDOMTouchPoint(aTarget,
|
||||
aIdentifier,
|
||||
aPageX,
|
||||
aPageY,
|
||||
aScreenX,
|
||||
aScreenY,
|
||||
aClientX,
|
||||
aClientY,
|
||||
aRadiusX,
|
||||
aRadiusY,
|
||||
aRotationAngle,
|
||||
aForce));
|
||||
return NS_OK;;
|
||||
NS_ADDREF(*aRetVal = new nsDOMTouch(aTarget,
|
||||
aIdentifier,
|
||||
aPageX,
|
||||
aPageY,
|
||||
aScreenX,
|
||||
aScreenY,
|
||||
aClientX,
|
||||
aClientY,
|
||||
aRadiusX,
|
||||
aRadiusY,
|
||||
aRotationAngle,
|
||||
aForce));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -8367,7 +8367,7 @@ nsDocument::CreateTouchList(nsIVariant* aPoints,
|
|||
type == nsIDataType::VTYPE_INTERFACE_IS) {
|
||||
nsCOMPtr<nsISupports> data;
|
||||
aPoints->GetAsISupports(getter_AddRefs(data));
|
||||
nsCOMPtr<nsIDOMTouchPoint> point = do_QueryInterface(data);
|
||||
nsCOMPtr<nsIDOMTouch> point = do_QueryInterface(data);
|
||||
if (point) {
|
||||
retval->Append(point);
|
||||
}
|
||||
|
@ -8382,7 +8382,7 @@ nsDocument::CreateTouchList(nsIVariant* aPoints,
|
|||
nsISupports** values = static_cast<nsISupports**>(rawArray);
|
||||
for (PRUint32 i = 0; i < valueCount; ++i) {
|
||||
nsCOMPtr<nsISupports> supports = dont_AddRef(values[i]);
|
||||
nsCOMPtr<nsIDOMTouchPoint> point = do_QueryInterface(supports);
|
||||
nsCOMPtr<nsIDOMTouch> point = do_QueryInterface(supports);
|
||||
if (point) {
|
||||
retval->Append(point);
|
||||
}
|
||||
|
|
|
@ -42,98 +42,98 @@
|
|||
#include "nsIXPCScriptable.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
DOMCI_DATA(TouchPoint, nsDOMTouchPoint)
|
||||
DOMCI_DATA(Touch, nsDOMTouch)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_1(nsDOMTouchPoint, mTarget)
|
||||
NS_IMPL_CYCLE_COLLECTION_1(nsDOMTouch, mTarget)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMTouchPoint)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMTouchPoint)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMTouchPoint)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(TouchPoint)
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMTouch)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMTouch)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMTouch)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(Touch)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMTouchPoint)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMTouchPoint)
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMTouch)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMTouch)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTouchPoint::GetIdentifier(PRInt32* aIdentifier)
|
||||
nsDOMTouch::GetIdentifier(PRInt32* aIdentifier)
|
||||
{
|
||||
*aIdentifier = mIdentifier;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTouchPoint::GetTarget(nsIDOMEventTarget** aTarget)
|
||||
nsDOMTouch::GetTarget(nsIDOMEventTarget** aTarget)
|
||||
{
|
||||
NS_IF_ADDREF(*aTarget = mTarget);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTouchPoint::GetScreenX(PRInt32* aScreenX)
|
||||
nsDOMTouch::GetScreenX(PRInt32* aScreenX)
|
||||
{
|
||||
*aScreenX = mScreenX;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTouchPoint::GetScreenY(PRInt32* aScreenY)
|
||||
nsDOMTouch::GetScreenY(PRInt32* aScreenY)
|
||||
{
|
||||
*aScreenY = mScreenY;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTouchPoint::GetClientX(PRInt32* aClientX)
|
||||
nsDOMTouch::GetClientX(PRInt32* aClientX)
|
||||
{
|
||||
*aClientX = mClientX;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTouchPoint::GetClientY(PRInt32* aClientY)
|
||||
nsDOMTouch::GetClientY(PRInt32* aClientY)
|
||||
{
|
||||
*aClientY = mClientY;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTouchPoint::GetPageX(PRInt32* aPageX)
|
||||
nsDOMTouch::GetPageX(PRInt32* aPageX)
|
||||
{
|
||||
*aPageX = mPageX;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTouchPoint::GetPageY(PRInt32* aPageY)
|
||||
nsDOMTouch::GetPageY(PRInt32* aPageY)
|
||||
{
|
||||
*aPageY = mPageY;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTouchPoint::GetRadiusX(PRInt32* aRadiusX)
|
||||
nsDOMTouch::GetRadiusX(PRInt32* aRadiusX)
|
||||
{
|
||||
*aRadiusX = mRadiusX;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTouchPoint::GetRadiusY(PRInt32* aRadiusY)
|
||||
nsDOMTouch::GetRadiusY(PRInt32* aRadiusY)
|
||||
{
|
||||
*aRadiusY = mRadiusY;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTouchPoint::GetRotationAngle(float* aRotationAngle)
|
||||
nsDOMTouch::GetRotationAngle(float* aRotationAngle)
|
||||
{
|
||||
*aRotationAngle = mRotationAngle;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTouchPoint::GetForce(float* aForce)
|
||||
nsDOMTouch::GetForce(float* aForce)
|
||||
{
|
||||
*aForce = mForce;
|
||||
return NS_OK;
|
||||
|
@ -170,17 +170,18 @@ nsDOMTouchList::GetLength(PRUint32* aLength)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTouchList::Item(PRUint32 aIndex, nsIDOMTouchPoint** aRetVal)
|
||||
nsDOMTouchList::Item(PRUint32 aIndex, nsIDOMTouch** aRetVal)
|
||||
{
|
||||
NS_IF_ADDREF(*aRetVal = mPoints.SafeObjectAt(aIndex));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTouchList::IdentifiedPoint(PRInt32 aIdentifier, nsIDOMTouchPoint** aRetVal)
|
||||
nsDOMTouchList::IdentifiedTouch(PRInt32 aIdentifier, nsIDOMTouch** aRetVal)
|
||||
{
|
||||
*aRetVal = nsnull;
|
||||
for (PRInt32 i = 0; i < mPoints.Count(); ++i) {
|
||||
nsCOMPtr<nsIDOMTouchPoint> point = mPoints[i];
|
||||
nsCOMPtr<nsIDOMTouch> point = mPoints[i];
|
||||
PRInt32 identifier;
|
||||
if (point && NS_SUCCEEDED(point->GetIdentifier(&identifier)) &&
|
||||
aIdentifier == identifier) {
|
||||
|
|
|
@ -42,21 +42,21 @@
|
|||
#include "nsString.h"
|
||||
#include "nsCOMArray.h"
|
||||
|
||||
class nsDOMTouchPoint : public nsIDOMTouchPoint
|
||||
class nsDOMTouch : public nsIDOMTouch
|
||||
{
|
||||
public:
|
||||
nsDOMTouchPoint(nsIDOMEventTarget* aTarget,
|
||||
PRInt32 aIdentifier,
|
||||
PRInt32 aPageX,
|
||||
PRInt32 aPageY,
|
||||
PRInt32 aScreenX,
|
||||
PRInt32 aScreenY,
|
||||
PRInt32 aClientX,
|
||||
PRInt32 aClientY,
|
||||
PRInt32 aRadiusX,
|
||||
PRInt32 aRadiusY,
|
||||
float aRotationAngle,
|
||||
float aForce)
|
||||
nsDOMTouch(nsIDOMEventTarget* aTarget,
|
||||
PRInt32 aIdentifier,
|
||||
PRInt32 aPageX,
|
||||
PRInt32 aPageY,
|
||||
PRInt32 aScreenX,
|
||||
PRInt32 aScreenY,
|
||||
PRInt32 aClientX,
|
||||
PRInt32 aClientY,
|
||||
PRInt32 aRadiusX,
|
||||
PRInt32 aRadiusY,
|
||||
float aRotationAngle,
|
||||
float aForce)
|
||||
: mTarget(aTarget),
|
||||
mIdentifier(aIdentifier),
|
||||
mPageX(aPageX),
|
||||
|
@ -71,8 +71,8 @@ public:
|
|||
mForce(aForce)
|
||||
{}
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(nsDOMTouchPoint)
|
||||
NS_DECL_NSIDOMTOUCHPOINT
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(nsDOMTouch)
|
||||
NS_DECL_NSIDOMTOUCH
|
||||
protected:
|
||||
nsCOMPtr<nsIDOMEventTarget> mTarget;
|
||||
PRInt32 mIdentifier;
|
||||
|
@ -95,17 +95,17 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTION_CLASS(nsDOMTouchList)
|
||||
NS_DECL_NSIDOMTOUCHLIST
|
||||
|
||||
void Append(nsIDOMTouchPoint* aPoint)
|
||||
void Append(nsIDOMTouch* aPoint)
|
||||
{
|
||||
mPoints.AppendObject(aPoint);
|
||||
}
|
||||
|
||||
nsIDOMTouchPoint* GetItemAt(PRUint32 aIndex)
|
||||
nsIDOMTouch* GetItemAt(PRUint32 aIndex)
|
||||
{
|
||||
return mPoints.SafeObjectAt(aIndex);
|
||||
}
|
||||
protected:
|
||||
nsCOMArray<nsIDOMTouchPoint> mPoints;
|
||||
nsCOMArray<nsIDOMTouch> mPoints;
|
||||
};
|
||||
|
||||
class nsDOMTouchEvent : public nsDOMUIEvent,
|
||||
|
|
|
@ -1502,7 +1502,7 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
|||
NS_DEFINE_CLASSINFO_DATA(EventException, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
|
||||
NS_DEFINE_CLASSINFO_DATA(TouchPoint, nsDOMGenericSH,
|
||||
NS_DEFINE_CLASSINFO_DATA(Touch, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(TouchList, nsDOMTouchListSH,
|
||||
ARRAY_SCRIPTABLE_FLAGS)
|
||||
|
@ -4321,9 +4321,9 @@ nsDOMClassInfo::Init()
|
|||
DOM_CLASSINFO_MAP_ENTRY(nsIException)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN_MAYBE_DISABLE(TouchPoint, nsIDOMTouchPoint,
|
||||
DOM_CLASSINFO_MAP_BEGIN_MAYBE_DISABLE(Touch, nsIDOMTouch,
|
||||
!nsDOMTouchEvent::PrefEnabled())
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMTouchPoint)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMTouch)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN_MAYBE_DISABLE(TouchList, nsIDOMTouchList,
|
||||
|
|
|
@ -513,7 +513,7 @@ DOMCI_CLASS(IDBDatabaseException)
|
|||
|
||||
DOMCI_CLASS(EventException)
|
||||
|
||||
DOMCI_CLASS(TouchPoint)
|
||||
DOMCI_CLASS(Touch)
|
||||
DOMCI_CLASS(TouchList)
|
||||
DOMCI_CLASS(TouchEvent)
|
||||
|
||||
|
|
|
@ -42,8 +42,8 @@ interface nsIVariant;
|
|||
* @see http://dvcs.w3.org/hg/webevents/raw-file/tip/touchevents.html
|
||||
*/
|
||||
|
||||
[scriptable, uuid(f9f200ad-228f-4879-bc9e-a13bd6bb82ef)]
|
||||
interface nsIDOMTouchPoint : nsISupports {
|
||||
[scriptable, uuid(98bc0f7d-5bff-4387-9c42-58af54b48dd5)]
|
||||
interface nsIDOMTouch : nsISupports {
|
||||
readonly attribute long identifier;
|
||||
readonly attribute nsIDOMEventTarget target;
|
||||
readonly attribute long pageX;
|
||||
|
@ -61,8 +61,8 @@ interface nsIDOMTouchPoint : nsISupports {
|
|||
[scriptable, uuid(60706eb7-d50d-4379-b01c-e78e6af84213)]
|
||||
interface nsIDOMTouchList : nsISupports {
|
||||
readonly attribute unsigned long length;
|
||||
nsIDOMTouchPoint item(in unsigned long index);
|
||||
nsIDOMTouchPoint identifiedPoint(in long identifier);
|
||||
nsIDOMTouch item(in unsigned long index);
|
||||
nsIDOMTouch identifiedTouch(in long identifier);
|
||||
};
|
||||
|
||||
[scriptable, uuid(df94b20b-7998-4f00-935c-ee2c6b179711)]
|
||||
|
@ -90,19 +90,19 @@ interface nsIDOMTouchEvent : nsIDOMUIEvent {
|
|||
|
||||
[scriptable, uuid(922e0f11-28b9-4560-9fb8-869fe143845f)]
|
||||
interface nsIDOMDocumentTouch : nsISupports {
|
||||
nsIDOMTouchPoint createTouch([optional] in nsIDOMAbstractView view,
|
||||
[optional] in nsIDOMEventTarget target,
|
||||
[optional] in long identifier,
|
||||
[optional] in long pageX,
|
||||
[optional] in long pageY,
|
||||
[optional] in long screenX,
|
||||
[optional] in long screenY,
|
||||
[optional] in long clientX,
|
||||
[optional] in long clientY,
|
||||
[optional] in long radiusX,
|
||||
[optional] in long radiusY,
|
||||
[optional] in float rotationAngle,
|
||||
[optional] in float force);
|
||||
nsIDOMTouch createTouch([optional] in nsIDOMAbstractView view,
|
||||
[optional] in nsIDOMEventTarget target,
|
||||
[optional] in long identifier,
|
||||
[optional] in long pageX,
|
||||
[optional] in long pageY,
|
||||
[optional] in long screenX,
|
||||
[optional] in long screenY,
|
||||
[optional] in long clientX,
|
||||
[optional] in long clientY,
|
||||
[optional] in long radiusX,
|
||||
[optional] in long radiusY,
|
||||
[optional] in float rotationAngle,
|
||||
[optional] in float force);
|
||||
|
||||
|
||||
nsIDOMTouchList createTouchList([optional] in nsIVariant aPoints);
|
||||
|
|
|
@ -204,7 +204,7 @@ members = [
|
|||
'nsIDOMNSUIEvent.pageY',
|
||||
'nsIDOMNSUIEvent.isChar',
|
||||
|
||||
'nsIDOMTouchPoint.*',
|
||||
'nsIDOMTouch.*',
|
||||
'nsIDOMTouchList.*',
|
||||
'nsIDOMTouchEvent.*',
|
||||
|
||||
|
@ -508,7 +508,7 @@ irregularFilenames = {
|
|||
|
||||
'nsIIndexedDatabaseUsageCallback': 'nsIIndexedDatabaseManager',
|
||||
|
||||
'nsIDOMTouchPoint': 'nsIDOMTouchEvent',
|
||||
'nsIDOMTouch': 'nsIDOMTouchEvent',
|
||||
'nsIDOMTouchList': 'nsIDOMTouchEvent',
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче