mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Collapse() might have destroyed 'frame'. b=368697 r+sr=roc
This commit is contained in:
parent
095ff1061e
commit
9ea6a75e09
@ -1407,8 +1407,10 @@ nsFrameSelection::MoveCaret(PRUint32 aKeycode,
|
|||||||
// 2. had select-all in a text input (DIV range), bug 352759.
|
// 2. had select-all in a text input (DIV range), bug 352759.
|
||||||
weakNodeUsed = mDomSelections[index]->FetchFocusNode();
|
weakNodeUsed = mDomSelections[index]->FetchFocusNode();
|
||||||
offsetused = mDomSelections[index]->FetchFocusOffset();
|
offsetused = mDomSelections[index]->FetchFocusOffset();
|
||||||
|
PRBool isBRFrame = frame->GetType() == nsGkAtoms::brFrame;
|
||||||
mDomSelections[index]->Collapse(weakNodeUsed, offsetused);
|
mDomSelections[index]->Collapse(weakNodeUsed, offsetused);
|
||||||
if (frame->GetType() == nsGkAtoms::brFrame) {
|
// Note: 'frame' might be dead here.
|
||||||
|
if (isBRFrame) {
|
||||||
tHint = mHint; // 1: make the line below restore the original hint
|
tHint = mHint; // 1: make the line below restore the original hint
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user