| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, Opera Software ASA. All rights reserved. | 2 * Copyright (c) 2013, Opera Software ASA. 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 ::skipUntil<LChar, LCharPredicateAdapter<characterPredicate>>(current, m
_end.characters8); | 209 ::skipUntil<LChar, LCharPredicateAdapter<characterPredicate>>(current, m
_end.characters8); |
| 210 return Run(getPosition(), current, m_is8Bit); | 210 return Run(getPosition(), current, m_is8Bit); |
| 211 } | 211 } |
| 212 const UChar* current = m_data.characters16; | 212 const UChar* current = m_data.characters16; |
| 213 ::skipUntil<UChar, characterPredicate>(current, m_end.characters16); | 213 ::skipUntil<UChar, characterPredicate>(current, m_end.characters16); |
| 214 return Run(getPosition(), reinterpret_cast<Position>(current), m_is8Bit); | 214 return Run(getPosition(), reinterpret_cast<Position>(current), m_is8Bit); |
| 215 } | 215 } |
| 216 | 216 |
| 217 inline void VTTScanner::seekTo(Position position) | 217 inline void VTTScanner::seekTo(Position position) |
| 218 { | 218 { |
| 219 ASSERT(position <= end()); | 219 DCHECK_LE(position, end()); |
| 220 m_data.characters8 = position; | 220 m_data.characters8 = position; |
| 221 } | 221 } |
| 222 | 222 |
| 223 inline UChar VTTScanner::currentChar() const | 223 inline UChar VTTScanner::currentChar() const |
| 224 { | 224 { |
| 225 ASSERT(getPosition() < end()); | 225 DCHECK_LT(getPosition(), end()); |
| 226 return m_is8Bit ? *m_data.characters8 : *m_data.characters16; | 226 return m_is8Bit ? *m_data.characters8 : *m_data.characters16; |
| 227 } | 227 } |
| 228 | 228 |
| 229 inline void VTTScanner::advance(unsigned amount) | 229 inline void VTTScanner::advance(unsigned amount) |
| 230 { | 230 { |
| 231 ASSERT(getPosition() < end()); | 231 DCHECK_LT(getPosition(), end()); |
| 232 if (m_is8Bit) | 232 if (m_is8Bit) |
| 233 m_data.characters8 += amount; | 233 m_data.characters8 += amount; |
| 234 else | 234 else |
| 235 m_data.characters16 += amount; | 235 m_data.characters16 += amount; |
| 236 } | 236 } |
| 237 | 237 |
| 238 } // namespace blink | 238 } // namespace blink |
| 239 | 239 |
| 240 #endif | 240 #endif |
| OLD | NEW |