fix for up down behavior after typing or selecting sr=kin a=scc r=jfrancis
git-svn-id: svn://10.0.0.236/trunk@119176 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2765,7 +2765,9 @@ nsSelection::TakeFocus(nsIContent *aNewFocus, PRUint32 aContentOffset,
|
||||
}
|
||||
else
|
||||
{
|
||||
PRBool oldDesiredXSet = mDesiredXSet; //need to keep old desired X if it was set.
|
||||
mDomSelections[index]->Collapse(domNode, aContentOffset);
|
||||
mDesiredXSet = oldDesiredXSet; //now reset desired X back.
|
||||
mBatching = batching;
|
||||
mChangesDuringBatching = changes;
|
||||
}
|
||||
@@ -5892,6 +5894,7 @@ nsTypedSelection::Collapse(nsIDOMNode* aParentNode, PRInt32 aOffset)
|
||||
{
|
||||
if (!aParentNode)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
mFrameSelection->InvalidateDesiredX();
|
||||
if (!IsValidSelectionPoint(mFrameSelection, aParentNode))
|
||||
return NS_ERROR_FAILURE;
|
||||
nsresult result;
|
||||
|
||||
@@ -2765,7 +2765,9 @@ nsSelection::TakeFocus(nsIContent *aNewFocus, PRUint32 aContentOffset,
|
||||
}
|
||||
else
|
||||
{
|
||||
PRBool oldDesiredXSet = mDesiredXSet; //need to keep old desired X if it was set.
|
||||
mDomSelections[index]->Collapse(domNode, aContentOffset);
|
||||
mDesiredXSet = oldDesiredXSet; //now reset desired X back.
|
||||
mBatching = batching;
|
||||
mChangesDuringBatching = changes;
|
||||
}
|
||||
@@ -5892,6 +5894,7 @@ nsTypedSelection::Collapse(nsIDOMNode* aParentNode, PRInt32 aOffset)
|
||||
{
|
||||
if (!aParentNode)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
mFrameSelection->InvalidateDesiredX();
|
||||
if (!IsValidSelectionPoint(mFrameSelection, aParentNode))
|
||||
return NS_ERROR_FAILURE;
|
||||
nsresult result;
|
||||
|
||||
Reference in New Issue
Block a user