Bug 389659: Scrollbar dragging broken when using fullZoom != 1.0. r+sr=roc, a19=dbaron

This commit is contained in:
sharparrow1@yahoo.com 2007-08-02 18:17:24 -07:00
parent 89e63cffbe
commit 08e9b1075e

View File

@ -856,18 +856,9 @@ nsSliderFrame::MouseDown(nsIDOMEvent* aMouseEvent)
}
}
PRInt32 clientPosPx;
nsIntRect screenRect = GetScreenRect();
nscoord pos;
if (isHorizontal) {
mouseEvent->GetScreenX(&clientPosPx);
pos = nsPresContext::CSSPixelsToAppUnits(clientPosPx) -
PresContext()->DevPixelsToAppUnits(screenRect.x);
} else {
mouseEvent->GetScreenY(&clientPosPx);
pos = nsPresContext::CSSPixelsToAppUnits(clientPosPx) -
PresContext()->DevPixelsToAppUnits(screenRect.y);
}
nsPoint pt = nsLayoutUtils::GetDOMEventCoordinatesRelativeTo(mouseEvent,
this);
nscoord pos = isHorizontal ? pt.x : pt.y;
// If shift click or middle button, first
// place the middle of the slider thumb under the click