Bug 305610. Fix regression from yesterday's event->point removal ... we didn't delete enough code! patch by Eli Friedman, r+sr=roc

This commit is contained in:
roc+%cs.cmu.edu 2005-08-23 20:48:56 +00:00
Родитель 607253a826
Коммит 6dfeabd466
1 изменённых файлов: 3 добавлений и 17 удалений

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

@ -519,27 +519,13 @@ nsSplitterFrameInner::MouseDrag(nsPresContext* aPresContext, nsGUIEvent* aEvent)
PRBool isHorizontal = !mOuter->IsHorizontal();
// convert coord to pixels
nsPoint pt = nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, mOuter);
nsPoint pt = nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent,
mParentBox);
nscoord pos = isHorizontal ? pt.x : pt.y;
// mDragStart is in frame coordinates
nscoord start = mDragStart;
// get it into our coordinate system (that is, the coordinate
// system that aEvent->point is in)
nsIView* eventCoordView;
nsPoint offsetFromView;
mOuter->GetOffsetFromView(offsetFromView, &eventCoordView);
NS_ASSERTION(eventCoordView, "No view?");
nsIView* rootView;
aPresContext->GetViewManager()->GetRootView(rootView);
NS_ASSERTION(rootView, "No root view?");
nsPoint eventCoordViewOffset = eventCoordView->GetOffsetTo(rootView);
start -= (isHorizontal ? eventCoordViewOffset.x : eventCoordViewOffset.y);
// take our current position and substract the start location
pos -= start;
@ -865,7 +851,7 @@ nsSplitterFrameInner::MouseDown(nsIDOMEvent* aMouseEvent)
PRInt32 c;
nsPoint pt = nsLayoutUtils::GetDOMEventCoordinatesRelativeTo(mouseEvent,
mOuter);
mParentBox);
if (isHorizontal) {
c = pt.x;
mSplitterPos = mOuter->mRect.x;