mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 1460509 - part 34: Make HTMLEditRules::MaybeSplitAncestorsForInsertWithTransaction() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: 7MqtKPNAOZ1 --HG-- extra : rebase_source : e66f057754082e0b28f14311462a84516c06cc37
This commit is contained in:
parent
a3320a815b
commit
76e7240d35
@ -8385,6 +8385,9 @@ HTMLEditRules::MaybeSplitAncestorsForInsertWithTransaction(
|
||||
*pointToInsert.GetChild(),
|
||||
aStartOfDeepestRightNode,
|
||||
SplitAtEdges::eAllowToCreateEmptyContainer);
|
||||
if (NS_WARN_IF(!CanHandleEditAction())) {
|
||||
return SplitNodeResult(NS_ERROR_EDITOR_DESTROYED);
|
||||
}
|
||||
NS_WARNING_ASSERTION(splitNodeResult.Succeeded(),
|
||||
"Failed to split the node for insert the element");
|
||||
return splitNodeResult;
|
||||
|
@ -528,9 +528,9 @@ protected:
|
||||
* the point to insert the element.
|
||||
*/
|
||||
template<typename PT, typename CT>
|
||||
SplitNodeResult MaybeSplitAncestorsForInsertWithTransaction(
|
||||
nsAtom& aTag,
|
||||
const EditorDOMPointBase<PT, CT>& aStartOfDeepestRightNode);
|
||||
MOZ_MUST_USE SplitNodeResult
|
||||
MaybeSplitAncestorsForInsertWithTransaction(
|
||||
nsAtom& aTag, const EditorDOMPointBase<PT, CT>& aStartOfDeepestRightNode);
|
||||
|
||||
/**
|
||||
* JoinNearestEditableNodesWithTransaction() joins two editable nodes which
|
||||
|
Loading…
Reference in New Issue
Block a user