Bug 1377978 - Make nsRange use uint32_t to offset

Tag #1375
This commit is contained in:
Matt A. Tobin 2020-04-17 06:10:23 -04:00 committed by Roy Tam
commit 6ce9cc2a25
23 changed files with 425 additions and 287 deletions

View file

@ -4747,9 +4747,11 @@ PresShell::ClipListToRange(nsDisplayListBuilder *aBuilder,
frame->GetOffsets(frameStartOffset, frameEndOffset);
int32_t hilightStart =
atStart ? std::max(aRange->StartOffset(), frameStartOffset) : frameStartOffset;
atStart ? std::max(static_cast<int32_t>(aRange->StartOffset()),
frameStartOffset) : frameStartOffset;
int32_t hilightEnd =
atEnd ? std::min(aRange->EndOffset(), frameEndOffset) : frameEndOffset;
atEnd ? std::min(static_cast<int32_t>(aRange->EndOffset()),
frameEndOffset) : frameEndOffset;
if (hilightStart < hilightEnd) {
// determine the location of the start and end edges of the range.
nsPoint startPoint, endPoint;