mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 852055 - Pass an EventTarget argument to Document.createTouch in WebIDL r=bz
This commit is contained in:
parent
25f835929b
commit
0204cf180b
@ -2091,7 +2091,7 @@ public:
|
||||
nsISupports* aResult, mozilla::ErrorResult& rv);
|
||||
// Touch event handlers already on nsINode
|
||||
already_AddRefed<nsIDOMTouch>
|
||||
CreateTouch(nsIDOMWindow* aView, nsISupports* aTarget,
|
||||
CreateTouch(nsIDOMWindow* aView, mozilla::dom::EventTarget* 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,
|
||||
|
@ -9163,7 +9163,8 @@ nsDocument::CreateTouch(nsIDOMWindow* aView,
|
||||
float aForce,
|
||||
nsIDOMTouch** aRetVal)
|
||||
{
|
||||
*aRetVal = nsIDocument::CreateTouch(aView, aTarget, aIdentifier, aPageX,
|
||||
nsCOMPtr<EventTarget> target = do_QueryInterface(aTarget);
|
||||
*aRetVal = nsIDocument::CreateTouch(aView, target, aIdentifier, aPageX,
|
||||
aPageY, aScreenX, aScreenY, aClientX,
|
||||
aClientY, aRadiusX, aRadiusY,
|
||||
aRotationAngle, aForce).get();
|
||||
@ -9172,7 +9173,7 @@ nsDocument::CreateTouch(nsIDOMWindow* aView,
|
||||
|
||||
already_AddRefed<nsIDOMTouch>
|
||||
nsIDocument::CreateTouch(nsIDOMWindow* aView,
|
||||
nsISupports* aTarget,
|
||||
EventTarget* aTarget,
|
||||
int32_t aIdentifier,
|
||||
int32_t aPageX, int32_t aPageY,
|
||||
int32_t aScreenX, int32_t aScreenY,
|
||||
@ -9181,8 +9182,7 @@ nsIDocument::CreateTouch(nsIDOMWindow* aView,
|
||||
float aRotationAngle,
|
||||
float aForce)
|
||||
{
|
||||
nsCOMPtr<EventTarget> target = do_QueryInterface(aTarget);
|
||||
nsCOMPtr<nsIDOMTouch> touch = new Touch(target,
|
||||
nsCOMPtr<nsIDOMTouch> touch = new Touch(aTarget,
|
||||
aIdentifier,
|
||||
aPageX, aPageY,
|
||||
aScreenX, aScreenY,
|
||||
|
@ -292,11 +292,7 @@ partial interface Document {
|
||||
// from our xpidl for now.
|
||||
[Creator, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
||||
Touch createTouch(optional Window? view = null,
|
||||
// Nasty hack, because we can't do EventTarget arguments yet
|
||||
// (they would need to be non-castable, but trying to do
|
||||
// XPConnect unwrapping with nsDOMEventTargetHelper fails).
|
||||
// optional EventTarget? target = null,
|
||||
optional nsISupports? target = null,
|
||||
optional EventTarget? target = null,
|
||||
optional long identifier = 0,
|
||||
optional long pageX = 0,
|
||||
optional long pageY = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user