[Webkit-unassigned] [Bug 52760] New: ComplexTextController incorrectly conflates string length and range of indexes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 19 15:57:02 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=52760

           Summary: ComplexTextController incorrectly conflates string
                    length and range of indexes
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.6
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Text
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: nholbrook at apple.com


Consider a run of 2 characters where each is in its own CTRun. As the ComplexTextRuns are iterated by ComplexTextController::advance(), glyphStartOffset gets 0, but glyphEndOffset gets 2 via complexTextRun.stringLength(), which results in a width of half the first adjusted advance: half because it is divided equally among 2 characters, and no more since"glyphEndOffset + complexTextRun.stringLocation() > m_currentCharacter" is true, which causes the loop to exit.

In order to fix this, ComplexTextRun needs to keep track of the original run range in order to return the end index (end in the sense of an STL range, or one past the last included value). Note that the string indices alone are not sufficient to determine the end index, as the last glyph may be a ligature and subsume more than one index.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list