summaryrefslogtreecommitdiff
path: root/layout/generic/nsFrame.cpp
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2022-04-26 10:20:30 -0500
committerBrian Smith <brian@dbsoft.org>2022-04-26 10:21:29 -0500
commite764f258e2530aa172102ff091ef205cc9bd5154 (patch)
tree57ce2c4d44b1500e51a48e6d793342e3cd295f4f /layout/generic/nsFrame.cpp
parent3daf711085889bad1bd68651bc4e8790412ae105 (diff)
downloaduxp-e764f258e2530aa172102ff091ef205cc9bd5154.tar.gz
Issue #1829 - Revert "Issue #1751 -- Remove XP_MACOSX conditionals from /layout"
This reverts commit aa0fd3d68c856504646e1d7eb499bc890ef44101.
Diffstat (limited to 'layout/generic/nsFrame.cpp')
-rw-r--r--layout/generic/nsFrame.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp
index af3d2f9457..eec58b98a2 100644
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -1,4 +1,5 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+// vim:cindent:ts=2:et:sw=2:
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -3055,7 +3056,11 @@ nsFrame::GetDataForTableSelection(const nsFrameSelection* aFrameSelection,
{
// In Browser, special 'table selection' key must be pressed for table selection
// or when just Shift is pressed and we're already in table/cell selection mode
+#ifdef XP_MACOSX
+ doTableSelection = aMouseEvent->IsMeta() || (aMouseEvent->IsShift() && selectingTableCells);
+#else
doTableSelection = aMouseEvent->IsControl() || (aMouseEvent->IsShift() && selectingTableCells);
+#endif
}
if (!doTableSelection)
return NS_OK;
@@ -3324,7 +3329,13 @@ nsFrame::HandlePress(nsPresContext* aPresContext,
if (!frameselection || frameselection->GetDisplaySelection() == nsISelectionController::SELECTION_OFF)
return NS_OK;//nothing to do we cannot affect selection from here
+#ifdef XP_MACOSX
+ if (mouseEvent->IsControl())
+ return NS_OK;//short circuit. hard coded for mac due to time restraints.
+ bool control = mouseEvent->IsMeta();
+#else
bool control = mouseEvent->IsControl();
+#endif
RefPtr<nsFrameSelection> fc = const_cast<nsFrameSelection*>(frameselection);
if (mouseEvent->mClickCount > 1) {