Bug 851180 - Ensure AndroidGeckoEvent::mAckNeeded is always initialized. r=gbrown

This commit is contained in:
Kartikaya Gupta 2013-03-14 21:19:24 +01:00
parent cb0307099d
commit be83be40c1
2 changed files with 4 additions and 12 deletions

View File

@ -487,6 +487,7 @@ void
AndroidGeckoEvent::Init(int aType, nsIntRect const& aRect)
{
mType = aType;
mAckNeeded = false;
mRect = aRect;
}
@ -641,28 +642,24 @@ void
AndroidGeckoEvent::Init(int aType)
{
mType = aType;
mAckNeeded = false;
}
void
AndroidGeckoEvent::Init(int aType, int aAction)
{
mType = aType;
mAckNeeded = false;
mAction = aAction;
}
void
AndroidGeckoEvent::Init(int x1, int y1, int x2, int y2)
{
mType = DRAW;
mRect.SetEmpty();
}
void
AndroidGeckoEvent::Init(AndroidGeckoEvent *aResizeEvent)
{
NS_ASSERTION(aResizeEvent->Type() == SIZE_CHANGED, "Init called on non-SIZE_CHANGED event");
mType = FORCED_RESIZE;
mAckNeeded = false;
mTime = aResizeEvent->mTime;
mPoints = aResizeEvent->mPoints; // x,y coordinates
}

View File

@ -593,16 +593,12 @@ class AndroidGeckoEvent : public WrappedJavaObject
public:
static void InitGeckoEventClass(JNIEnv *jEnv);
AndroidGeckoEvent() { }
AndroidGeckoEvent(int aType) {
Init(aType);
}
AndroidGeckoEvent(int aType, int aAction) {
Init(aType, aAction);
}
AndroidGeckoEvent(int x1, int y1, int x2, int y2) {
Init(x1, y1, x2, y2);
}
AndroidGeckoEvent(int aType, const nsIntRect &aRect) {
Init(aType, aRect);
}
@ -616,7 +612,6 @@ public:
void Init(JNIEnv *jenv, jobject jobj);
void Init(int aType);
void Init(int aType, int aAction);
void Init(int x1, int y1, int x2, int y2);
void Init(int aType, const nsIntRect &aRect);
void Init(AndroidGeckoEvent *aResizeEvent);