NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; }
nsSliderFrame::HandleEvent(nsIPresContext& aPresContext, nsGUIEvent* aEvent, nsEventStatus& aEventStatus) { nsIContent* scrollbar = GetScrollBar();  PRBool isHorizontal = IsHorizontal(scrollbar);  if (isCapturingEvents()) { switch (aEvent->message) { case NS_MOUSE_MOVE: {  nscoord pos = isHorizontal ? aEvent->point.x : aEvent->point.y;   nscoord startpx = mDragStartPx;  float p2t; aPresContext.GetScaledPixelsToTwips(&p2t); nscoord onePixel = NSIntPixelsToTwips(1, p2t); nscoord start = startpx*onePixel;  nsIFrame* thumbFrame = mFrames.FirstChild();   start -= mThumbStart;   pos -= start;   nscoord pospx = pos/onePixel;   pospx = nscoord(pospx/mRatio);   SetCurrentPosition(aPresContext, scrollbar, thumbFrame, pospx); } break;  case NS_MOUSE_LEFT_BUTTON_UP:   nsIFrame* thumbFrame = mFrames.FirstChild(); AddListener(); CaptureMouseEvents(PR_FALSE); } return nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus); }  nsIFrame* thumbFrame = mFrames.FirstChild(); nsRect thumbRect; thumbFrame->GetRect(thumbRect);  if (thumbRect.Contains(aEvent->point)) { switch (aEvent->message) { case NS_MOUSE_LEFT_BUTTON_DOWN:      break; } return nsHTMLContainerFrame::HandleEvent(aPresContext, aEvent, aEventStatus);  } else if ((isHorizontal && aEvent->point.x < thumbRect.x) || (!isHorizontal && aEvent->point.y < thumbRect.y)) {   switch (aEvent->message) { case NS_MOUSE_LEFT_BUTTON_DOWN:  PageUpDown(aPresContext, thumbFrame, -1); break; } } else { switch (aEvent->message) { case NS_MOUSE_LEFT_BUTTON_DOWN:  PageUpDown(aPresContext, thumbFrame, 1); break; } }    return NS_OK; }
  NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; }