From ff04156de558ad0be72be48b58169fb084bdc8a2 Mon Sep 17 00:00:00 2001 From: "brade%netscape.com" Date: Thu, 13 Jan 2000 16:07:03 +0000 Subject: [PATCH] use proper key for discontiguous selection on Mac (r=jfrancis) git-svn-id: svn://10.0.0.236/trunk@57680 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsFrame.cpp | 9 +++++++-- mozilla/layout/html/base/src/nsFrame.cpp | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index 405a80da845..27bd2c55f52 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -839,7 +839,6 @@ nsFrame::HandlePress(nsIPresContext* aPresContext, nsCOMPtr shell; nsresult rv = aPresContext->GetShell(getter_AddRefs(shell)); if (NS_SUCCEEDED(rv) && shell) { - nsInputEvent *inputEvent = (nsInputEvent *)aEvent; PRInt32 startPos = 0; // PRUint32 contentOffset = 0; PRInt32 contentOffsetEnd = 0; @@ -851,7 +850,13 @@ nsFrame::HandlePress(nsIPresContext* aPresContext, nsCOMPtr frameselection; if (NS_SUCCEEDED(shell->GetFrameSelection(getter_AddRefs(frameselection))) && frameselection){ frameselection->SetMouseDownState(PR_TRUE);//not important if it fails here - frameselection->HandleClick(newContent, startPos , contentOffsetEnd , inputEvent->isShift, inputEvent->isControl,beginContent); + PRBool doMultipleSelection; +#ifdef XP_MAC + doMultipleSelection = me->isMeta; +#else + doMultipleSelection = me->isControl; +#endif + frameselection->HandleClick(newContent, startPos , contentOffsetEnd , me->isShift, doMultipleSelection, beginContent); } //no release } diff --git a/mozilla/layout/html/base/src/nsFrame.cpp b/mozilla/layout/html/base/src/nsFrame.cpp index 405a80da845..27bd2c55f52 100644 --- a/mozilla/layout/html/base/src/nsFrame.cpp +++ b/mozilla/layout/html/base/src/nsFrame.cpp @@ -839,7 +839,6 @@ nsFrame::HandlePress(nsIPresContext* aPresContext, nsCOMPtr shell; nsresult rv = aPresContext->GetShell(getter_AddRefs(shell)); if (NS_SUCCEEDED(rv) && shell) { - nsInputEvent *inputEvent = (nsInputEvent *)aEvent; PRInt32 startPos = 0; // PRUint32 contentOffset = 0; PRInt32 contentOffsetEnd = 0; @@ -851,7 +850,13 @@ nsFrame::HandlePress(nsIPresContext* aPresContext, nsCOMPtr frameselection; if (NS_SUCCEEDED(shell->GetFrameSelection(getter_AddRefs(frameselection))) && frameselection){ frameselection->SetMouseDownState(PR_TRUE);//not important if it fails here - frameselection->HandleClick(newContent, startPos , contentOffsetEnd , inputEvent->isShift, inputEvent->isControl,beginContent); + PRBool doMultipleSelection; +#ifdef XP_MAC + doMultipleSelection = me->isMeta; +#else + doMultipleSelection = me->isControl; +#endif + frameselection->HandleClick(newContent, startPos , contentOffsetEnd , me->isShift, doMultipleSelection, beginContent); } //no release }