Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: Source/platform/fonts/UTF16TextIterator.h

Issue 1285633003: Change handling of unmatched surrogate pairs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressing reviewer comments Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 int offset() const { return m_offset; } 63 int offset() const { return m_offset; }
64 const UChar* characters() const { return m_characters; } 64 const UChar* characters() const { return m_characters; }
65 const UChar* glyphEnd() const { return m_characters + m_currentGlyphLength; } 65 const UChar* glyphEnd() const { return m_characters + m_currentGlyphLength; }
66 // FIXME: Only used by SimpleShaper, should be removed once the SimpleShaper 66 // FIXME: Only used by SimpleShaper, should be removed once the SimpleShaper
67 // is removed. 67 // is removed.
68 unsigned glyphLength() const { return m_currentGlyphLength; } 68 unsigned glyphLength() const { return m_currentGlyphLength; }
69 69
70 private: 70 private:
71 bool isValidSurrogatePair(UChar32&);
71 bool consumeSurrogatePair(UChar32&); 72 bool consumeSurrogatePair(UChar32&);
72 void consumeMultipleUChar(); 73 void consumeMultipleUChar();
73 74
74 const UChar* m_characters; 75 const UChar* m_characters;
75 const UChar* m_charactersEnd; 76 const UChar* m_charactersEnd;
76 int m_offset; 77 int m_offset;
77 int m_endOffset; 78 int m_endOffset;
78 unsigned m_currentGlyphLength; 79 unsigned m_currentGlyphLength;
79 }; 80 };
80 81
81 } 82 }
82 83
83 #endif 84 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/text/unmatched-surrogate-pair-expected.html ('k') | Source/platform/fonts/UTF16TextIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698