summaryrefslogtreecommitdiffstats
path: root/layout/generic/nsTextFrame.cpp
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 /layout/generic/nsTextFrame.cpp
parentd8282a0da137a1e503b1c89febdbe766a55b750a (diff)
downloadUXP-44967b330d3aec6959410c3f54d9cbcc04059aac.tar
UXP-44967b330d3aec6959410c3f54d9cbcc04059aac.tar.gz
UXP-44967b330d3aec6959410c3f54d9cbcc04059aac.tar.lz
UXP-44967b330d3aec6959410c3f54d9cbcc04059aac.tar.xz
UXP-44967b330d3aec6959410c3f54d9cbcc04059aac.zip
Check if we're already at the end of the frame's content.
Diffstat (limited to 'layout/generic/nsTextFrame.cpp')
-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 0641c7439..59ef020ce 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);
}