Bug 864206 - Use dom::Touch instead of nsIDOMTouch where possible r=Ms2ger

This commit is contained in:
David Zbarsky
2013-05-17 13:17:53 -07:00
parent cfbd5f0652
commit a2fe5c8cd6
21 changed files with 70 additions and 42 deletions

View File

@@ -7,8 +7,11 @@
#include "AndroidBridge.h"
#include "nsIAndroidBridge.h"
#include "nsIDOMKeyEvent.h"
#include "nsIWidget.h"
#include "nsGUIEvent.h"
using namespace mozilla;
using namespace mozilla::dom;
jclass AndroidGeckoEvent::jGeckoEventClass = 0;
jfieldID AndroidGeckoEvent::jActionField = 0;
@@ -736,11 +739,11 @@ AndroidGeckoEvent::MakeTouchEvent(nsIWidget* widget)
const nsIntPoint& offset = widget->WidgetToScreenOffset();
event.touches.SetCapacity(endIndex - startIndex);
for (int i = startIndex; i < endIndex; i++) {
nsCOMPtr<nsIDOMTouch> t(new dom::Touch(PointIndicies()[i],
Points()[i] - offset,
PointRadii()[i],
Orientations()[i],
Pressures()[i]));
nsRefPtr<Touch> t = new Touch(PointIndicies()[i],
Points()[i] - offset,
PointRadii()[i],
Orientations()[i],
Pressures()[i]);
event.touches.AppendElement(t);
}