mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 09:01:16 +00:00
use proper key for discontiguous selection on Mac (r=jfrancis)
This commit is contained in:
parent
04d15b9381
commit
ef62b4b778
@ -839,7 +839,6 @@ nsFrame::HandlePress(nsIPresContext* aPresContext,
|
||||
nsCOMPtr<nsIPresShell> 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<nsIFrameSelection> 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
|
||||
}
|
||||
|
@ -839,7 +839,6 @@ nsFrame::HandlePress(nsIPresContext* aPresContext,
|
||||
nsCOMPtr<nsIPresShell> 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<nsIFrameSelection> 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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user