зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
47f36b9458
Коммит
d6ca24e794
|
@ -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.");
|
||||
|
|
Загрузка…
Ссылка в новой задаче