diff options
author | Brian Smith <brian@dbsoft.org> | 2022-04-26 10:20:30 -0500 |
---|---|---|
committer | Brian Smith <brian@dbsoft.org> | 2022-04-26 10:21:29 -0500 |
commit | e764f258e2530aa172102ff091ef205cc9bd5154 (patch) | |
tree | 57ce2c4d44b1500e51a48e6d793342e3cd295f4f /layout/forms | |
parent | 3daf711085889bad1bd68651bc4e8790412ae105 (diff) | |
download | uxp-e764f258e2530aa172102ff091ef205cc9bd5154.tar.gz |
Issue #1829 - Revert "Issue #1751 -- Remove XP_MACOSX conditionals from /layout"
This reverts commit aa0fd3d68c856504646e1d7eb499bc890ef44101.
Diffstat (limited to 'layout/forms')
-rw-r--r-- | layout/forms/nsListControlFrame.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index 50e05776ef..5e157b7842 100644 --- a/layout/forms/nsListControlFrame.cpp +++ b/layout/forms/nsListControlFrame.cpp @@ -834,7 +834,11 @@ nsListControlFrame::HandleListSelection(nsIDOMEvent* aEvent, nsCOMPtr<nsIDOMMouseEvent> mouseEvent = do_QueryInterface(aEvent); bool isShift; bool isControl; +#ifdef XP_MACOSX + mouseEvent->GetMetaKey(&isControl); +#else mouseEvent->GetCtrlKey(&isControl); +#endif mouseEvent->GetShiftKey(&isShift); return PerformSelection(aClickedIndex, isShift, isControl); // might destroy us } @@ -1904,7 +1908,11 @@ nsListControlFrame::DragMove(nsIDOMEvent* aMouseEvent) nsCOMPtr<nsIDOMMouseEvent> mouseEvent = do_QueryInterface(aMouseEvent); NS_ASSERTION(mouseEvent, "aMouseEvent is not an nsIDOMMouseEvent!"); bool isControl; +#ifdef XP_MACOSX + mouseEvent->GetMetaKey(&isControl); +#else mouseEvent->GetCtrlKey(&isControl); +#endif nsWeakFrame weakFrame(this); // Turn SHIFT on when you are dragging, unless control is on. bool wasChanged = PerformSelection(selectedIndex, @@ -2112,8 +2120,14 @@ nsListControlFrame::KeyDown(nsIDOMEvent* aKeyEvent) bool dropDownMenuOnUpDown; bool dropDownMenuOnSpace; +#ifdef XP_MACOSX + dropDownMenuOnUpDown = IsInDropDownMode() && !mComboboxFrame->IsDroppedDown(); + dropDownMenuOnSpace = !keyEvent->IsAlt() && !keyEvent->IsControl() && + !keyEvent->IsMeta(); +#else dropDownMenuOnUpDown = keyEvent->IsAlt(); dropDownMenuOnSpace = IsInDropDownMode() && !mComboboxFrame->IsDroppedDown(); +#endif bool withinIncrementalSearchTime = keyEvent->mTime - gLastKeyTime <= INCREMENTAL_SEARCH_KEYPRESS_TIME; if ((dropDownMenuOnUpDown && |