| Index: third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h
|
| diff --git a/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h b/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h
|
| index ededc8b11f5a9f9d99b9438346d6aec18ecd2e86..18c9e80b6787e050a7fa556206c6319567ef267a 100644
|
| --- a/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h
|
| +++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h
|
| @@ -50,8 +50,15 @@ public:
|
| template<bool characterPredicate(UChar)>
|
| unsigned skipWhilePredicate(unsigned offset)
|
| {
|
| - while ((m_offset + offset) < m_stringLength && characterPredicate((*m_string)[m_offset + offset]))
|
| - ++offset;
|
| + if (m_string->is8Bit()) {
|
| + const LChar* characters8 = m_string->characters8();
|
| + while ((m_offset + offset) < m_stringLength && characterPredicate(characters8[m_offset + offset]))
|
| + ++offset;
|
| + } else {
|
| + const UChar* characters16 = m_string->characters16();
|
| + while ((m_offset + offset) < m_stringLength && characterPredicate(characters16[m_offset + offset]))
|
| + ++offset;
|
| + }
|
| return offset;
|
| }
|
|
|
|
|