Chromium Code Reviews| Index: Source/core/css/parser/BisonCSSParser-in.cpp |
| diff --git a/Source/core/css/parser/BisonCSSParser-in.cpp b/Source/core/css/parser/BisonCSSParser-in.cpp |
| index beddcb89d944af671876e7e29c0902d59a06647a..7e14232c206714675b55897c4e097143eb4e97fc 100644 |
| --- a/Source/core/css/parser/BisonCSSParser-in.cpp |
| +++ b/Source/core/css/parser/BisonCSSParser-in.cpp |
| @@ -1783,15 +1783,13 @@ ALWAYS_INLINE static void makeLower(const CharacterType* input, CharacterType* o |
| } |
| } |
| -void BisonCSSParser::tokenToLowerCase(const CSSParserString& token) |
| +void BisonCSSParser::tokenToLowerCase(CSSParserString& token) |
| { |
| size_t length = token.length(); |
| - if (m_tokenizer.is8BitSource()) { |
| - size_t offset = token.characters8() - m_tokenizer.m_dataStart8.get(); |
| - makeLower(token.characters8(), m_tokenizer.m_dataStart8.get() + offset, length); |
| + if (token.is8Bit()) { |
| + makeLower(token.characters8(), const_cast<LChar*>(token.characters8()), length); |
| } else { |
| - size_t offset = token.characters16() - m_tokenizer.m_dataStart16.get(); |
| - makeLower(token.characters16(), m_tokenizer.m_dataStart16.get() + offset, length); |
| + makeLower(token.characters16(), const_cast<UChar*>(token.characters16()), length); |
|
rune
2014/04/02 11:11:09
Excuse my unicode ignorance, but are you guarantee
|
| } |
| } |