fix for bug #3162, Removed #ifndef MAC in the nsSelectControlFrame::GetProperty.
The Mac now supports native combo box widgets so it no longer will crash in GetProperty with a null mWidget field. Modified nsComboboxControlFrame::HandleEvents. MouseExit from the combox rect now initiates mouse capture on the drop-down list. Modified nsCSSFrameConstructor::ConstructSelectFrame to initialize the drop-down list for frame-based comboboxes as hidden. Added a nsIListControlFrame::CaptureMouseEvents method. Implemented nsListControlFrame::CaptureMouseEvents. git-svn-id: svn://10.0.0.236/trunk@27879 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -694,6 +694,11 @@ NS_IMETHODIMP nsComboboxControlFrame::HandleEvent(nsIPresContext& aPresContext,
|
||||
nsGUIEvent* aEvent,
|
||||
nsEventStatus& aEventStatus)
|
||||
{
|
||||
if (aEvent->message == NS_MOUSE_EXIT) {
|
||||
if (mArrowStyle == mBtnPressedStyleContext) {
|
||||
mListControlFrame->CaptureMouseEvents(PR_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
if (nsEventStatus_eConsumeNoDefault == aEventStatus) {
|
||||
return NS_OK;
|
||||
@@ -714,10 +719,6 @@ NS_IMETHODIMP nsComboboxControlFrame::HandleEvent(nsIPresContext& aPresContext,
|
||||
if (aEvent->message == NS_MOUSE_LEFT_BUTTON_UP) {
|
||||
mArrowStyle = mBtnOutStyleContext;
|
||||
nsFormControlHelper::ForceDrawFrame(this);
|
||||
//MouseClicked(&aPresContext);
|
||||
|
||||
} else if (aEvent->message == NS_MOUSE_MOVE) {
|
||||
|
||||
} else if (aEvent->message == NS_MOUSE_LEFT_BUTTON_DOWN) {
|
||||
mArrowStyle = mBtnPressedStyleContext;
|
||||
nsFormControlHelper::ForceDrawFrame(this);
|
||||
|
||||
Reference in New Issue
Block a user