mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
fixing bugs for unnecessary drawing in text fram as well as other assorted selection bugs.
This commit is contained in:
parent
adb997b56f
commit
e60293b6e6
@ -1841,13 +1841,6 @@ nsTextFrame::SetSelected(nsIDOMRange *aRange,PRBool aSelected, PRBool aSpread)
|
||||
else
|
||||
found = PR_FALSE;
|
||||
}
|
||||
if (found){ //if range contains this frame...
|
||||
/* nsRect frameRect;
|
||||
GetRect(frameRect);
|
||||
nsRect rect(0, 0, frameRect.width, frameRect.height);
|
||||
Invalidate(rect, PR_FALSE);
|
||||
*/ ForceDrawFrame(this);
|
||||
}
|
||||
nsFrameState frameState;
|
||||
GetFrameState(&frameState);
|
||||
if ( aSelected )
|
||||
@ -1855,6 +1848,13 @@ nsTextFrame::SetSelected(nsIDOMRange *aRange,PRBool aSelected, PRBool aSpread)
|
||||
else
|
||||
frameState &= ~NS_FRAME_SELECTED_CONTENT;
|
||||
SetFrameState(frameState);
|
||||
if (found){ //if range contains this frame...
|
||||
nsRect frameRect;
|
||||
GetRect(frameRect);
|
||||
nsRect rect(0, 0, frameRect.width, frameRect.height);
|
||||
Invalidate(rect, PR_TRUE);
|
||||
// ForceDrawFrame(this);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1841,13 +1841,6 @@ nsTextFrame::SetSelected(nsIDOMRange *aRange,PRBool aSelected, PRBool aSpread)
|
||||
else
|
||||
found = PR_FALSE;
|
||||
}
|
||||
if (found){ //if range contains this frame...
|
||||
/* nsRect frameRect;
|
||||
GetRect(frameRect);
|
||||
nsRect rect(0, 0, frameRect.width, frameRect.height);
|
||||
Invalidate(rect, PR_FALSE);
|
||||
*/ ForceDrawFrame(this);
|
||||
}
|
||||
nsFrameState frameState;
|
||||
GetFrameState(&frameState);
|
||||
if ( aSelected )
|
||||
@ -1855,6 +1848,13 @@ nsTextFrame::SetSelected(nsIDOMRange *aRange,PRBool aSelected, PRBool aSpread)
|
||||
else
|
||||
frameState &= ~NS_FRAME_SELECTED_CONTENT;
|
||||
SetFrameState(frameState);
|
||||
if (found){ //if range contains this frame...
|
||||
nsRect frameRect;
|
||||
GetRect(frameRect);
|
||||
nsRect rect(0, 0, frameRect.width, frameRect.height);
|
||||
Invalidate(rect, PR_TRUE);
|
||||
// ForceDrawFrame(this);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user