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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user