mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1152290 - "[e10s] "<select>" doesn't show selected value". r=roc
--HG-- extra : rebase_source : c37303d508d4fdee0952059c14e79145a503bb7f
This commit is contained in:
parent
61d0725d6d
commit
03cc3bcefa
@ -1760,7 +1760,7 @@ nsListControlFrame::GetIndexFromDOMEvent(nsIDOMEvent* aMouseEvent,
|
|||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static bool
|
||||||
FireShowDropDownEvent(nsIContent* aContent)
|
FireShowDropDownEvent(nsIContent* aContent)
|
||||||
{
|
{
|
||||||
if (XRE_GetProcessType() == GeckoProcessType_Content &&
|
if (XRE_GetProcessType() == GeckoProcessType_Content &&
|
||||||
@ -1768,7 +1768,10 @@ FireShowDropDownEvent(nsIContent* aContent)
|
|||||||
nsContentUtils::DispatchChromeEvent(aContent->OwnerDoc(), aContent,
|
nsContentUtils::DispatchChromeEvent(aContent->OwnerDoc(), aContent,
|
||||||
NS_LITERAL_STRING("mozshowdropdown"), true,
|
NS_LITERAL_STRING("mozshowdropdown"), true,
|
||||||
false);
|
false);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
@ -1818,7 +1821,9 @@ nsListControlFrame::MouseDown(nsIDOMEvent* aMouseEvent)
|
|||||||
} else {
|
} else {
|
||||||
// NOTE: the combo box is responsible for dropping it down
|
// NOTE: the combo box is responsible for dropping it down
|
||||||
if (mComboboxFrame) {
|
if (mComboboxFrame) {
|
||||||
FireShowDropDownEvent(mContent);
|
if (FireShowDropDownEvent(mContent)) {
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
if (!IgnoreMouseEventForSelection(aMouseEvent)) {
|
if (!IgnoreMouseEventForSelection(aMouseEvent)) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
@ -2059,8 +2064,9 @@ nsListControlFrame::DropDownToggleKey(nsIDOMEvent* aKeyEvent)
|
|||||||
if (IsInDropDownMode() && !nsComboboxControlFrame::ToolkitHasNativePopup()) {
|
if (IsInDropDownMode() && !nsComboboxControlFrame::ToolkitHasNativePopup()) {
|
||||||
aKeyEvent->PreventDefault();
|
aKeyEvent->PreventDefault();
|
||||||
if (!mComboboxFrame->IsDroppedDown()) {
|
if (!mComboboxFrame->IsDroppedDown()) {
|
||||||
FireShowDropDownEvent(mContent);
|
if (!FireShowDropDownEvent(mContent)) {
|
||||||
mComboboxFrame->ShowDropDown(true);
|
mComboboxFrame->ShowDropDown(true);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
nsWeakFrame weakFrame(this);
|
nsWeakFrame weakFrame(this);
|
||||||
// mEndSelectionIndex is the last item that got selected.
|
// mEndSelectionIndex is the last item that got selected.
|
||||||
|
Loading…
Reference in New Issue
Block a user