mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 897211: Remove nsIDOMDocumentTouch r=bz
This commit is contained in:
parent
39339b3d6c
commit
59ed7d9509
@ -1576,7 +1576,6 @@ NS_INTERFACE_TABLE_HEAD(nsDocument)
|
||||
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIRadioGroupContainer)
|
||||
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIMutationObserver)
|
||||
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIApplicationCacheContainer)
|
||||
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMDocumentTouch)
|
||||
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsITouchEventReceiver)
|
||||
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIInlineEventHandlers)
|
||||
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIObserver)
|
||||
@ -9253,30 +9252,6 @@ nsDocument::SetImagesNeedAnimating(bool aAnimating)
|
||||
mAnimatingImages = aAnimating;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocument::CreateTouch(nsIDOMWindow* aView,
|
||||
nsIDOMEventTarget* aTarget,
|
||||
int32_t aIdentifier,
|
||||
int32_t aPageX,
|
||||
int32_t aPageY,
|
||||
int32_t aScreenX,
|
||||
int32_t aScreenY,
|
||||
int32_t aClientX,
|
||||
int32_t aClientY,
|
||||
int32_t aRadiusX,
|
||||
int32_t aRadiusY,
|
||||
float aRotationAngle,
|
||||
float aForce,
|
||||
nsIDOMTouch** aRetVal)
|
||||
{
|
||||
nsCOMPtr<EventTarget> target = do_QueryInterface(aTarget);
|
||||
*aRetVal = nsIDocument::CreateTouch(aView, target, aIdentifier, aPageX,
|
||||
aPageY, aScreenX, aScreenY, aClientX,
|
||||
aClientY, aRadiusX, aRadiusY,
|
||||
aRotationAngle, aForce).get();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<Touch>
|
||||
nsIDocument::CreateTouch(nsIDOMWindow* aView,
|
||||
EventTarget* aTarget,
|
||||
@ -9299,47 +9274,6 @@ nsIDocument::CreateTouch(nsIDOMWindow* aView,
|
||||
return touch.forget();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocument::CreateTouchList(nsIVariant* aPoints,
|
||||
nsIDOMTouchList** aRetVal)
|
||||
{
|
||||
nsRefPtr<nsDOMTouchList> retval = new nsDOMTouchList(ToSupports(this));
|
||||
if (aPoints) {
|
||||
uint16_t type;
|
||||
aPoints->GetDataType(&type);
|
||||
if (type == nsIDataType::VTYPE_INTERFACE ||
|
||||
type == nsIDataType::VTYPE_INTERFACE_IS) {
|
||||
nsCOMPtr<nsISupports> data;
|
||||
aPoints->GetAsISupports(getter_AddRefs(data));
|
||||
nsCOMPtr<nsIDOMTouch> point = do_QueryInterface(data);
|
||||
if (point) {
|
||||
retval->Append(static_cast<Touch*>(point.get()));
|
||||
}
|
||||
} else if (type == nsIDataType::VTYPE_ARRAY) {
|
||||
uint16_t valueType;
|
||||
nsIID iid;
|
||||
uint32_t valueCount;
|
||||
void* rawArray;
|
||||
aPoints->GetAsArray(&valueType, &iid, &valueCount, &rawArray);
|
||||
if (valueType == nsIDataType::VTYPE_INTERFACE ||
|
||||
valueType == nsIDataType::VTYPE_INTERFACE_IS) {
|
||||
nsISupports** values = static_cast<nsISupports**>(rawArray);
|
||||
for (uint32_t i = 0; i < valueCount; ++i) {
|
||||
nsCOMPtr<nsISupports> supports = dont_AddRef(values[i]);
|
||||
nsCOMPtr<nsIDOMTouch> point = do_QueryInterface(supports);
|
||||
if (point) {
|
||||
retval->Append(static_cast<Touch*>(point.get()));
|
||||
}
|
||||
}
|
||||
}
|
||||
nsMemory::Free(rawArray);
|
||||
}
|
||||
}
|
||||
|
||||
*aRetVal = retval.forget().get();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<nsDOMTouchList>
|
||||
nsIDocument::CreateTouchList()
|
||||
{
|
||||
|
@ -503,7 +503,7 @@ class nsDocument : public nsIDocument,
|
||||
public nsIRadioGroupContainer,
|
||||
public nsIApplicationCacheContainer,
|
||||
public nsStubMutationObserver,
|
||||
public nsIDOMDocumentTouch,
|
||||
public nsITouchEventReceiver,
|
||||
public nsIInlineEventHandlers,
|
||||
public nsIObserver
|
||||
{
|
||||
@ -783,9 +783,6 @@ public:
|
||||
// nsITouchEventReceiver
|
||||
NS_DECL_NSITOUCHEVENTRECEIVER
|
||||
|
||||
// nsIDOMDocumentTouch
|
||||
NS_DECL_NSIDOMDOCUMENTTOUCH
|
||||
|
||||
// nsIInlineEventHandlers
|
||||
NS_DECL_NSIINLINEEVENTHANDLERS
|
||||
|
||||
|
@ -77,23 +77,3 @@ interface nsITouchEventReceiver : nsISupports {
|
||||
[implicit_jscontext] attribute jsval ontouchleave;
|
||||
[implicit_jscontext] attribute jsval ontouchcancel;
|
||||
};
|
||||
|
||||
[scriptable, uuid(974cff68-6f0b-4520-8523-fa68b2754656)]
|
||||
interface nsIDOMDocumentTouch : nsITouchEventReceiver {
|
||||
nsIDOMTouch createTouch([optional] in nsIDOMWindow 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);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user