Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Unified Diff: Source/core/css/parser/BisonCSSParser-in.cpp

Issue 213743018: Fix for CSS identifier related assert (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
}
}
« LayoutTests/fast/css/css-escaped-identifier.html ('K') | « Source/core/css/parser/BisonCSSParser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698