summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/HTMLEditorDataTransfer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/libeditor/HTMLEditorDataTransfer.cpp')
-rw-r--r--editor/libeditor/HTMLEditorDataTransfer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/editor/libeditor/HTMLEditorDataTransfer.cpp b/editor/libeditor/HTMLEditorDataTransfer.cpp
index c56fbead7..0c01bdd1c 100644
--- a/editor/libeditor/HTMLEditorDataTransfer.cpp
+++ b/editor/libeditor/HTMLEditorDataTransfer.cpp
@@ -145,14 +145,13 @@ HTMLEditor::LoadHTML(const nsAString& aInputString)
rv = range->GetStartContainer(getter_AddRefs(parent));
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_TRUE(parent, NS_ERROR_NULL_POINTER);
- int32_t childOffset;
- rv = range->GetStartOffset(&childOffset);
- NS_ENSURE_SUCCESS(rv, rv);
+ uint32_t childOffset = range->StartOffset();
nsCOMPtr<nsIDOMNode> nodeToInsert;
docfrag->GetFirstChild(getter_AddRefs(nodeToInsert));
while (nodeToInsert) {
- rv = InsertNode(nodeToInsert, parent, childOffset++);
+ rv = InsertNode(nodeToInsert, parent,
+ static_cast<int32_t>(childOffset++));
NS_ENSURE_SUCCESS(rv, rv);
docfrag->GetFirstChild(getter_AddRefs(nodeToInsert));
}