From cc27c616f70b85ee2b157c2dc2fa43c78132a124 Mon Sep 17 00:00:00 2001 From: "mjudge%netscape.com" Date: Thu, 17 Apr 2003 21:25:03 +0000 Subject: [PATCH] 163235 if we are collapsing selection to the beginning of the extended selection, set the "hint" to the right as a tie breaker. the opposite is true for collapsing forwards in the document. r=jfrancis sr=fraser. --- content/base/src/nsSelection.cpp | 2 ++ layout/generic/nsSelection.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/content/base/src/nsSelection.cpp b/content/base/src/nsSelection.cpp index e0b640e6471..71a6accb167 100644 --- a/content/base/src/nsSelection.cpp +++ b/content/base/src/nsSelection.cpp @@ -1502,6 +1502,7 @@ nsSelection::MoveCaret(PRUint32 aKeycode, PRBool aContinue, nsSelectionAmount aA } result = mDomSelections[index]->Collapse(weakNodeUsed,offsetused); mDomSelections[index]->ScrollIntoView(); + mHint = HINTRIGHT; return NS_OK; } break; case nsIDOMKeyEvent::DOM_VK_RIGHT : @@ -1516,6 +1517,7 @@ nsSelection::MoveCaret(PRUint32 aKeycode, PRBool aContinue, nsSelectionAmount aA } result = mDomSelections[index]->Collapse(weakNodeUsed,offsetused); mDomSelections[index]->ScrollIntoView(); + mHint = HINTLEFT; return NS_OK; } break; diff --git a/layout/generic/nsSelection.cpp b/layout/generic/nsSelection.cpp index e0b640e6471..71a6accb167 100644 --- a/layout/generic/nsSelection.cpp +++ b/layout/generic/nsSelection.cpp @@ -1502,6 +1502,7 @@ nsSelection::MoveCaret(PRUint32 aKeycode, PRBool aContinue, nsSelectionAmount aA } result = mDomSelections[index]->Collapse(weakNodeUsed,offsetused); mDomSelections[index]->ScrollIntoView(); + mHint = HINTRIGHT; return NS_OK; } break; case nsIDOMKeyEvent::DOM_VK_RIGHT : @@ -1516,6 +1517,7 @@ nsSelection::MoveCaret(PRUint32 aKeycode, PRBool aContinue, nsSelectionAmount aA } result = mDomSelections[index]->Collapse(weakNodeUsed,offsetused); mDomSelections[index]->ScrollIntoView(); + mHint = HINTLEFT; return NS_OK; } break;