mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
Bug 1286464 part.11 nsTextFrame::GetCharacterRectsInRange() shouldn't compute character rect at the first character in next nsTextFrame r=jfkthame
nsTextFrame::GetCharacterRectsInRange() handles a character at the end offset of its content as in it. However, it causes odd result when the caller wants first text rect in the next nsTextFrame. E.g., if end of query range is at the next nsTextFrame's first character, currently, it returns the last character as in same line. So, it should stop handling next frame's first character as in it. MozReview-Commit-ID: 7WteerisrZp --HG-- extra : rebase_source : 97653f1ed04a6a03373cd53613d92aba45fbe38b
This commit is contained in:
parent
dd3468f808
commit
925390facb
@ -7454,7 +7454,7 @@ nsTextFrame::GetCharacterRectsInRange(int32_t aInOffset,
|
||||
UpdateIteratorFromOffset(properties, aInOffset, iter);
|
||||
|
||||
const int32_t kContentEnd = GetContentEnd();
|
||||
const int32_t kEndOffset = std::min(aInOffset + aLength, kContentEnd + 1);
|
||||
const int32_t kEndOffset = std::min(aInOffset + aLength, kContentEnd);
|
||||
while (aInOffset < kEndOffset) {
|
||||
if (!iter.IsOriginalCharSkipped() &&
|
||||
!mTextRun->IsClusterStart(iter.GetSkippedOffset())) {
|
||||
|
Loading…
Reference in New Issue
Block a user