mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1117586, [e10s] select dropdowns cannot be opened with the keyboard, r=roc
This commit is contained in:
parent
8c31f6b805
commit
29ed098f9e
@ -1760,6 +1760,17 @@ nsListControlFrame::GetIndexFromDOMEvent(nsIDOMEvent* aMouseEvent,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
static void
|
||||
FireShowDropDownEvent(nsIContent* aContent)
|
||||
{
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content &&
|
||||
Preferences::GetBool("browser.tabs.remote.desktopbehavior", false)) {
|
||||
nsContentUtils::DispatchChromeEvent(aContent->OwnerDoc(), aContent,
|
||||
NS_LITERAL_STRING("mozshowdropdown"), true,
|
||||
false);
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsListControlFrame::MouseDown(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
@ -1807,13 +1818,7 @@ nsListControlFrame::MouseDown(nsIDOMEvent* aMouseEvent)
|
||||
} else {
|
||||
// NOTE: the combo box is responsible for dropping it down
|
||||
if (mComboboxFrame) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content &&
|
||||
Preferences::GetBool("browser.tabs.remote.desktopbehavior", false)) {
|
||||
nsContentUtils::DispatchChromeEvent(mContent->OwnerDoc(), mContent,
|
||||
NS_LITERAL_STRING("mozshowdropdown"), true,
|
||||
false);
|
||||
return NS_OK;
|
||||
}
|
||||
FireShowDropDownEvent(mContent);
|
||||
|
||||
if (!IgnoreMouseEventForSelection(aMouseEvent)) {
|
||||
return NS_OK;
|
||||
@ -2054,6 +2059,7 @@ nsListControlFrame::DropDownToggleKey(nsIDOMEvent* aKeyEvent)
|
||||
if (IsInDropDownMode() && !nsComboboxControlFrame::ToolkitHasNativePopup()) {
|
||||
aKeyEvent->PreventDefault();
|
||||
if (!mComboboxFrame->IsDroppedDown()) {
|
||||
FireShowDropDownEvent(mContent);
|
||||
mComboboxFrame->ShowDropDown(true);
|
||||
} else {
|
||||
nsWeakFrame weakFrame(this);
|
||||
|
Loading…
Reference in New Issue
Block a user