Shift click to continue selection

git-svn-id: svn://10.0.0.236/trunk@21422 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mjudge%netscape.com
1999-02-21 01:23:40 +00:00
parent 83081501e5
commit 581b55a5ac
2 changed files with 4 additions and 2 deletions

View File

@@ -705,6 +705,7 @@ nsFrame::HandlePress(nsIPresContext& aPresContext,
mDidDrag = PR_FALSE;
nsCOMPtr<nsIPresShell> shell;
nsresult rv = aPresContext.GetShell(getter_AddRefs(shell));
nsInputEvent *inputEvent = (nsInputEvent *)aEvent;
if (NS_SUCCEEDED(rv) && shell) {
nsCOMPtr<nsIRenderingContext> acx;
rv = shell->CreateRenderingContext(this, getter_AddRefs(acx));
@@ -720,7 +721,7 @@ nsFrame::HandlePress(nsIPresContext& aPresContext,
if (NS_SUCCEEDED(selection->QueryInterface(kIFrameSelection,
(void **)&frameselection))) {
frameselection->EnableFrameNotification(PR_FALSE);
frameselection->TakeFocus(tracker, this, startPos, contentOffset, PR_FALSE);
frameselection->TakeFocus(tracker, this, startPos, contentOffset, inputEvent->isShift);
frameselection->EnableFrameNotification(PR_TRUE);//prevent cyclic call to reset selection.
NS_RELEASE(frameselection);
}

View File

@@ -705,6 +705,7 @@ nsFrame::HandlePress(nsIPresContext& aPresContext,
mDidDrag = PR_FALSE;
nsCOMPtr<nsIPresShell> shell;
nsresult rv = aPresContext.GetShell(getter_AddRefs(shell));
nsInputEvent *inputEvent = (nsInputEvent *)aEvent;
if (NS_SUCCEEDED(rv) && shell) {
nsCOMPtr<nsIRenderingContext> acx;
rv = shell->CreateRenderingContext(this, getter_AddRefs(acx));
@@ -720,7 +721,7 @@ nsFrame::HandlePress(nsIPresContext& aPresContext,
if (NS_SUCCEEDED(selection->QueryInterface(kIFrameSelection,
(void **)&frameselection))) {
frameselection->EnableFrameNotification(PR_FALSE);
frameselection->TakeFocus(tracker, this, startPos, contentOffset, PR_FALSE);
frameselection->TakeFocus(tracker, this, startPos, contentOffset, inputEvent->isShift);
frameselection->EnableFrameNotification(PR_TRUE);//prevent cyclic call to reset selection.
NS_RELEASE(frameselection);
}