Bug 1184665 - Remove a spammy editor warning

This commit is contained in:
Ehsan Akhgari 2015-08-10 23:45:00 -04:00
parent c8c028f108
commit 8c91b99061

View File

@ -317,7 +317,9 @@ nsHTMLEditRules::BeforeEdit(EditAction action,
nsRefPtr<Selection> selection = mHTMLEditor->GetSelection(); nsRefPtr<Selection> selection = mHTMLEditor->GetSelection();
// get the selection location // get the selection location
NS_ENSURE_STATE(selection->RangeCount()); if (!selection->RangeCount()) {
return NS_ERROR_UNEXPECTED;
}
mRangeItem->startNode = selection->GetRangeAt(0)->GetStartParent(); mRangeItem->startNode = selection->GetRangeAt(0)->GetStartParent();
mRangeItem->startOffset = selection->GetRangeAt(0)->StartOffset(); mRangeItem->startOffset = selection->GetRangeAt(0)->StartOffset();
mRangeItem->endNode = selection->GetRangeAt(0)->GetEndParent(); mRangeItem->endNode = selection->GetRangeAt(0)->GetEndParent();