mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 08:13:35 +00:00
new fix for table selection into and out. works great.
This commit is contained in:
parent
abc3703399
commit
bcbb9f3512
@ -2167,16 +2167,36 @@ nsDOMSelection::FixupSelectionPoints(nsIDOMRange *aRange , nsDirection *aDir, PR
|
|||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (*aDir == eDirNext)
|
||||||
|
{
|
||||||
if (FetchAnchorNode() == startNode.get() && FetchFocusNode() == endNode.get() &&
|
if (FetchAnchorNode() == startNode.get() && FetchFocusNode() == endNode.get() &&
|
||||||
FetchAnchorOffset() == startOffset && FetchFocusOffset() == endOffset)
|
FetchAnchorOffset() == startOffset && FetchFocusOffset() == endOffset)
|
||||||
{
|
{
|
||||||
*aFixupState = PR_FALSE;
|
*aFixupState = PR_FALSE;
|
||||||
return NS_ERROR_FAILURE;//nothing to do
|
return NS_ERROR_FAILURE;//nothing to do
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (FetchAnchorNode() == endNode.get() && FetchFocusNode() == startNode.get() &&
|
||||||
|
FetchAnchorOffset() == endOffset && FetchFocusOffset() == startOffset)
|
||||||
|
{
|
||||||
|
*aFixupState = PR_FALSE;
|
||||||
|
return NS_ERROR_FAILURE;//nothing to do
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mFixupState && !dirtyend && !dirtystart)//no mor fixup! all bets off
|
||||||
|
{
|
||||||
|
dirtystart = PR_TRUE;//force a reset of anchor positions
|
||||||
|
dirtystart = PR_TRUE;
|
||||||
|
*aFixupState = PR_TRUE;//redraw all selection here
|
||||||
|
mFixupState = PR_FALSE;//no more fixup for next time
|
||||||
|
}
|
||||||
|
else
|
||||||
if ((dirtystart || dirtyend) && *aDir != mDirection) //fixup took place but new direction all bets are off
|
if ((dirtystart || dirtyend) && *aDir != mDirection) //fixup took place but new direction all bets are off
|
||||||
{
|
{
|
||||||
*aFixupState = PR_TRUE;
|
*aFixupState = PR_TRUE;
|
||||||
mFixupState = PR_FALSE;
|
//mFixupState = PR_FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (dirtystart && (FetchAnchorNode() != startNode.get() || FetchAnchorOffset() != startOffset))
|
if (dirtystart && (FetchAnchorNode() != startNode.get() || FetchAnchorOffset() != startOffset))
|
||||||
@ -2192,7 +2212,7 @@ nsDOMSelection::FixupSelectionPoints(nsIDOMRange *aRange , nsDirection *aDir, PR
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mFixupState = PR_FALSE;
|
mFixupState = dirtystart || dirtyend;
|
||||||
*aFixupState = PR_FALSE;
|
*aFixupState = PR_FALSE;
|
||||||
}
|
}
|
||||||
if (dirtystart || dirtyend){
|
if (dirtystart || dirtyend){
|
||||||
|
Loading…
Reference in New Issue
Block a user