Bug 236438. Make nsImageControlFrame translate its event point properly even if it has no view

This commit is contained in:
roc+%cs.cmu.edu 2004-03-06 04:48:15 +00:00
Родитель 3367d05d49
Коммит 0784ae856d
2 изменённых файлов: 4 добавлений и 12 удалений

Просмотреть файл

@ -264,12 +264,8 @@ nsImageControlFrame::HandleEvent(nsIPresContext* aPresContext,
case NS_MOUSE_LEFT_BUTTON_UP:
{
// Store click point for GetNamesValues
// Do this on MouseUp because the specs don't say and that's what IE does.
float t2p;
t2p = aPresContext->TwipsToPixels();
mLastClickPoint.x = NSTwipsToIntPixels(aEvent->point.x, t2p);
mLastClickPoint.y = NSTwipsToIntPixels(aEvent->point.y, t2p);
// Do this on MouseUp because the specs don't say and that's what IE does
TranslateEventCoords(aPresContext, aEvent->point, mLastClickPoint);
break;
}
}

Просмотреть файл

@ -264,12 +264,8 @@ nsImageControlFrame::HandleEvent(nsIPresContext* aPresContext,
case NS_MOUSE_LEFT_BUTTON_UP:
{
// Store click point for GetNamesValues
// Do this on MouseUp because the specs don't say and that's what IE does.
float t2p;
t2p = aPresContext->TwipsToPixels();
mLastClickPoint.x = NSTwipsToIntPixels(aEvent->point.x, t2p);
mLastClickPoint.y = NSTwipsToIntPixels(aEvent->point.y, t2p);
// Do this on MouseUp because the specs don't say and that's what IE does
TranslateEventCoords(aPresContext, aEvent->point, mLastClickPoint);
break;
}
}