| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2003, 2006, 2008, 2009, 2010, 2011 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2008 Holger Hans Peter Freyther | 4 * Copyright (C) 2008 Holger Hans Peter Freyther |
| 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 if (characters_ + 1 >= characters_end_) | 46 if (characters_ + 1 >= characters_end_) |
| 47 return false; | 47 return false; |
| 48 | 48 |
| 49 UChar low = characters_[1]; | 49 UChar low = characters_[1]; |
| 50 if (!U16_IS_TRAIL(low)) | 50 if (!U16_IS_TRAIL(low)) |
| 51 return false; | 51 return false; |
| 52 return true; | 52 return true; |
| 53 } | 53 } |
| 54 | 54 |
| 55 bool UTF16TextIterator::ConsumeSurrogatePair(UChar32& character) { | 55 bool UTF16TextIterator::ConsumeSurrogatePair(UChar32& character) { |
| 56 ASSERT(U16_IS_SURROGATE(character)); | 56 DCHECK(U16_IS_SURROGATE(character)); |
| 57 | 57 |
| 58 if (!IsValidSurrogatePair(character)) { | 58 if (!IsValidSurrogatePair(character)) { |
| 59 character = kReplacementCharacter; | 59 character = kReplacementCharacter; |
| 60 return true; | 60 return true; |
| 61 } | 61 } |
| 62 | 62 |
| 63 UChar low = characters_[1]; | 63 UChar low = characters_[1]; |
| 64 character = U16_GET_SUPPLEMENTARY(character, low); | 64 character = U16_GET_SUPPLEMENTARY(character, low); |
| 65 current_glyph_length_ = 2; | 65 current_glyph_length_ = 2; |
| 66 return true; | 66 return true; |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace blink | 69 } // namespace blink |
| OLD | NEW |