mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
Bug 291443. Listboxes should always direct mouse capture to their scrolled frame, to ensure that events reach the DOM event listener. r+sr=bzbarsky,a=chofmann
This commit is contained in:
parent
0ba4408929
commit
bc6893b6ba
@ -1365,20 +1365,7 @@ nsListControlFrame::CaptureMouseEvents(nsPresContext* aPresContext, PRBool aGrab
|
||||
if (aGrabMouseEvents && IsInDropDownMode() && nsComboboxControlFrame::ToolkitHasNativePopup())
|
||||
return NS_OK;
|
||||
|
||||
nsIView* view = nsnull;
|
||||
if (IsInDropDownMode()) {
|
||||
view = GetView();
|
||||
} else {
|
||||
nsIFrame* scrolledFrame = GetScrolledFrame();
|
||||
NS_ASSERTION(scrolledFrame, "No scrolled frame found");
|
||||
NS_ENSURE_TRUE(scrolledFrame, NS_ERROR_FAILURE);
|
||||
|
||||
nsIFrame* scrollport = scrolledFrame->GetParent();
|
||||
NS_ASSERTION(scrollport, "No scrollport found");
|
||||
NS_ENSURE_TRUE(scrollport, NS_ERROR_FAILURE);
|
||||
|
||||
view = scrollport->GetView();
|
||||
}
|
||||
nsIView* view = GetScrolledFrame()->GetView();
|
||||
|
||||
NS_ASSERTION(view, "no view???");
|
||||
NS_ENSURE_TRUE(view, NS_ERROR_FAILURE);
|
||||
|
Loading…
Reference in New Issue
Block a user