summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/EditorBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/libeditor/EditorBase.cpp')
-rw-r--r--editor/libeditor/EditorBase.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp
index 5df4ff2c4..27983df31 100644
--- a/editor/libeditor/EditorBase.cpp
+++ b/editor/libeditor/EditorBase.cpp
@@ -5275,7 +5275,7 @@ EditorBase::GetIMESelectionStartOffsetIn(nsINode* aTextNode)
return -1;
}
- int32_t minOffset = INT32_MAX;
+ uint32_t minOffset = UINT32_MAX;
static const SelectionType kIMESelectionTypes[] = {
SelectionType::eIMERawClause,
SelectionType::eIMESelectedRawClause,
@@ -5295,15 +5295,11 @@ EditorBase::GetIMESelectionStartOffsetIn(nsINode* aTextNode)
if (NS_WARN_IF(range->GetStartParent() != aTextNode)) {
// ignore the start offset...
} else {
- MOZ_ASSERT(range->StartOffset() >= 0,
- "start offset shouldn't be negative");
minOffset = std::min(minOffset, range->StartOffset());
}
if (NS_WARN_IF(range->GetEndParent() != aTextNode)) {
// ignore the end offset...
} else {
- MOZ_ASSERT(range->EndOffset() >= 0,
- "start offset shouldn't be negative");
minOffset = std::min(minOffset, range->EndOffset());
}
}