Index: third_party/WebKit/Source/platform/text/TextRun.h |
diff --git a/third_party/WebKit/Source/platform/text/TextRun.h b/third_party/WebKit/Source/platform/text/TextRun.h |
index 1cec2196b84abecf9b9b4c0d5f6f7f0ab6913fd3..da248e4f33accc392b22f84acabae1454fe6cd74 100644 |
--- a/third_party/WebKit/Source/platform/text/TextRun.h |
+++ b/third_party/WebKit/Source/platform/text/TextRun.h |
@@ -182,6 +182,15 @@ class PLATFORM_EXPORT TextRun final { |
return m_data.characters16; |
} |
+ UChar32 codepointAt(unsigned i) const { |
+ if (is8Bit()) |
+ return (*this)[i]; |
+ UChar32 codepoint; |
+ SECURITY_DCHECK(i < m_len); |
+ U16_GET(characters16(), 0, i, m_len, codepoint); |
+ return codepoint; |
+ } |
+ |
UChar32 codepointAtAndNext(unsigned& i) const { |
if (is8Bit()) |
return (*this)[i++]; |