mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1117586, [e10s] select dropdowns cannot be opened with the keyboard, r=roc
This commit is contained in:
parent
7f0cac73a3
commit
ed3482df8a
@ -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