| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2015 Google Inc. All rights reserved. | 2 * Copyright (C) 2015 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 } | 147 } |
| 148 } | 148 } |
| 149 | 149 |
| 150 for (unsigned i = m_startIndex + 1; ; i++) { | 150 for (unsigned i = m_startIndex + 1; ; i++) { |
| 151 if (i == length || isWordDelimiter(m_textRun[i])) { | 151 if (i == length || isWordDelimiter(m_textRun[i])) { |
| 152 return i; | 152 return i; |
| 153 } | 153 } |
| 154 if (!m_textRun.is8Bit()) { | 154 if (!m_textRun.is8Bit()) { |
| 155 UChar32 nextChar; | 155 UChar32 nextChar; |
| 156 U16_GET(m_textRun.characters16(), 0, i, length, nextChar); | 156 U16_GET(m_textRun.characters16(), 0, i, length, nextChar); |
| 157 if (Character::isCJKIdeographOrSymbol(nextChar)) | 157 if (Character::isCJKIdeographOrSymbolBase(nextChar)) |
| 158 return i; | 158 return i; |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 | 162 |
| 163 bool shapeToEndIndex(RefPtr<ShapeResult>* result, unsigned endIndex) | 163 bool shapeToEndIndex(RefPtr<ShapeResult>* result, unsigned endIndex) |
| 164 { | 164 { |
| 165 if (!endIndex || endIndex <= m_startIndex) | 165 if (!endIndex || endIndex <= m_startIndex) |
| 166 return false; | 166 return false; |
| 167 | 167 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 const Font* m_font; | 219 const Font* m_font; |
| 220 ShapeResultSpacing m_spacing; | 220 ShapeResultSpacing m_spacing; |
| 221 float m_widthSoFar; // Used only when allowTabs() | 221 float m_widthSoFar; // Used only when allowTabs() |
| 222 unsigned m_startIndex : 31; | 222 unsigned m_startIndex : 31; |
| 223 unsigned m_shapeByWord : 1; | 223 unsigned m_shapeByWord : 1; |
| 224 }; | 224 }; |
| 225 | 225 |
| 226 } // namespace blink | 226 } // namespace blink |
| 227 | 227 |
| 228 #endif // CachingWordShapeIterator_h | 228 #endif // CachingWordShapeIterator_h |
| OLD | NEW |