Bug 1783402 - part 3: Make result of unsafe getter methods of EditorDOMPointBase templated r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D153842
This commit is contained in:
@@ -742,8 +742,8 @@ nsresult HTMLEditor::HTMLWithContextInserter::Run(
|
||||
if (pointToInsert.IsInTextNode()) {
|
||||
const SplitNodeResult splitNodeResult =
|
||||
mHTMLEditor.SplitNodeDeepWithTransaction(
|
||||
MOZ_KnownLive(*pointToInsert.ContainerAsContent()), pointToInsert,
|
||||
SplitAtEdges::eAllowToCreateEmptyContainer);
|
||||
MOZ_KnownLive(*pointToInsert.ContainerAs<nsIContent>()),
|
||||
pointToInsert, SplitAtEdges::eAllowToCreateEmptyContainer);
|
||||
if (splitNodeResult.isErr()) {
|
||||
NS_WARNING("HTMLEditor::SplitNodeDeepWithTransaction() failed");
|
||||
return splitNodeResult.unwrapErr();
|
||||
@@ -835,7 +835,7 @@ HTMLEditor::HTMLWithContextInserter::InsertContents(
|
||||
const RefPtr<const Element> maybeNonEditableBlockElement =
|
||||
pointToInsert.IsInContentNode()
|
||||
? HTMLEditUtils::GetInclusiveAncestorElement(
|
||||
*pointToInsert.ContainerAsContent(),
|
||||
*pointToInsert.ContainerAs<nsIContent>(),
|
||||
HTMLEditUtils::ClosestBlockElement)
|
||||
: nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user