DescriptionUse the right TextRun length when checking for surrogate pairs
The isValidSurrogatePair helper in LayoutSVGInlineText.cpp operates on a
TextRun and an index, and checks if the character at the index is part
of a valid surrogate pair.
To check the trailing character, the next index is checked against the
length of the TextRun (to see if the character exists).
The TextRun used is a "sub run" of the entire text node, which means
that the operator[] implementation expects accesses to be within the sub
run rather than the "full run".
Since this function is always used for runs that are sub runs, it should
use TextRun::length() rather than TextRun::charactersLength() to stay
consistent with the iteration and the code using it.
BUG=610641
Committed: https://crrev.com/7dabd875312333379d052e609cc9aad621de1754
Cr-Commit-Position: refs/heads/master@{#392880}
Patch Set 1 #Patch Set 2 : Tweak test #
Messages
Total messages: 10 (4 generated)
|