Bug 389933 - "ASSERTION: JoinNode called with node not listed in offset table while editing HTML email in GMail" [p=chris@pearce.org.nz (Chris Pearce [cpearce]) r=peterv sr=roc a1.9=schrep]

This commit is contained in:
reed@reedloden.com 2007-12-19 03:32:20 -08:00
Родитель 8f2a12172d
Коммит 65cd25f37d
2 изменённых файлов: 13 добавлений и 4 удалений

Просмотреть файл

@ -547,6 +547,13 @@ nsHTMLEditRules::AfterEditInner(PRInt32 action, nsIEditor::EDirection aDirection
}
}
// Ensure range offsets are up to date.
if (mDocChangeRange) {
mDocChangeRange->GetStartContainer(getter_AddRefs(rangeStartParent));
mDocChangeRange->GetEndContainer(getter_AddRefs(rangeEndParent));
mDocChangeRange->GetStartOffset(&rangeStartOffset);
mDocChangeRange->GetEndOffset(&rangeEndOffset);
}
res = mHTMLEditor->HandleInlineSpellCheck(action, selection,
mRangeItem.startNode, mRangeItem.startOffset,
rangeStartParent, rangeStartOffset,

Просмотреть файл

@ -2626,9 +2626,9 @@ nsTextServicesDocument::JoinNodes(nsIDOMNode *aLeftNode,
if (!leftHasEntry)
{
// XXX: Not sure if we should be throwing an error here!
NS_ASSERTION(0, "JoinNode called with node not listed in offset table.");
return NS_ERROR_FAILURE;
// It's okay if the node isn't in the offset table, the
// editor could be cleaning house.
return NS_OK;
}
result = NodeHasOffsetEntry(&mOffsetTable, aRightNode, &rightHasEntry, &rightIndex);
@ -2638,7 +2638,9 @@ nsTextServicesDocument::JoinNodes(nsIDOMNode *aLeftNode,
if (!rightHasEntry)
{
return NS_ERROR_FAILURE;
// It's okay if the node isn't in the offset table, the
// editor could be cleaning house.
return NS_OK;
}
NS_ASSERTION(leftIndex < rightIndex, "Indexes out of order.");