import from UXP: [layout] Check offset against start of skip range. (80b4d0fb)

This commit is contained in:
2026-05-08 07:07:40 +08:00
parent ccd5312757
commit 53149e33f8
+1 -1
View File
@@ -7375,7 +7375,7 @@ nsTextFrame::GetCharacterOffsetAtFramePointInternal(nsPoint aPoint,
gfxFontUtils::IsRegionalIndicator
(SURROGATE_TO_UCS4(frag->CharAt(offs), frag->CharAt(offs + 1)))) {
allowSplitLigature = false;
if (extraCluster.GetSkippedOffset() > 1 &&
if (extraCluster.GetSkippedOffset() >= skippedRange.start + 2 &&
!mTextRun->IsLigatureGroupStart(extraCluster.GetSkippedOffset())) {
// CountCharsFit() left us in the middle of the flag; back up over the
// first character of the ligature, and adjust fitWidth accordingly.