summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Kew <jkew@mozilla.com>2019-12-06 13:42:37 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-12-06 13:42:37 +0100
commit44967b330d3aec6959410c3f54d9cbcc04059aac (patch)
tree0c1d12df3999b10ddb594b335153a34724f6ed99
parentd8282a0da137a1e503b1c89febdbe766a55b750a (diff)
downloaduxp-44967b330d3aec6959410c3f54d9cbcc04059aac.tar.gz
Check if we're already at the end of the frame's content.
-rw-r--r--layout/generic/nsTextFrame.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp
index 0641c7439a..59ef020ce2 100644
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -7525,7 +7525,8 @@ nsTextFrame::GetCharacterRectsInRange(int32_t aInOffset,
gfxSkipCharsIterator nextIter(iter);
nextIter.AdvanceOriginal(1);
if (!nextIter.IsOriginalCharSkipped() &&
- !mTextRun->IsClusterStart(nextIter.GetSkippedOffset())) {
+ !mTextRun->IsClusterStart(nextIter.GetSkippedOffset()) &&
+ nextIter.GetOriginalOffset() < kContentEnd) {
FindClusterEnd(mTextRun, kContentEnd, &nextIter);
}