Chromium Code Reviews| Index: Source/core/css/CSSParserValues.h |
| diff --git a/Source/core/css/CSSParserValues.h b/Source/core/css/CSSParserValues.h |
| index 37d56aac75202f6815ea7697921650889b626eb1..3ef91b4391bb69216c9c5ea71f5b6dd66ef534fc 100644 |
| --- a/Source/core/css/CSSParserValues.h |
| +++ b/Source/core/css/CSSParserValues.h |
| @@ -98,9 +98,8 @@ struct CSSParserString { |
| bool equalIgnoringCase(const char* str) const |
| { |
| - if (is8Bit()) |
| - return WTF::equalIgnoringCase(str, characters8(), length()); |
| - return WTF::equalIgnoringCase(str, characters16(), length()); |
| + bool match = is8Bit() ? WTF::equalIgnoringCase(str, characters8(), length()) : WTF::equalIgnoringCase(str, characters16(), length()); |
| + return match ? str[length()] == '\0' : false; |
|
dglazkov
2014/03/06 18:35:03
We shouldn't wallpaper of what looks like a bug in
adamk
2014/03/06 22:42:18
Seems like you this function should just start wit
tasak
2014/03/07 05:08:18
Yeah. So is it ok to use strlen?
I think, strlen(
|
| } |
| template <size_t strLength> |