| Index: Source/core/css/CSSParserValues.h
|
| diff --git a/Source/core/css/CSSParserValues.h b/Source/core/css/CSSParserValues.h
|
| index 79888d6cab00c134f090c66829fac7dc4483d960..a03ca5c16fc5ab826715537e3c1fa33dd319defe 100644
|
| --- a/Source/core/css/CSSParserValues.h
|
| +++ b/Source/core/css/CSSParserValues.h
|
| @@ -101,14 +101,20 @@ struct CSSParserString {
|
| template <size_t strLength>
|
| bool startsWithIgnoringCase(const char (&str)[strLength]) const
|
| {
|
| - return startsWithIgnoringCase(str, strLength - 1);
|
| + return containsIgnoringCaseAt(str, strLength - 1, 0);
|
| }
|
|
|
| - bool startsWithIgnoringCase(const char* str, size_t strLength) const
|
| + template <size_t strLength>
|
| + bool containsIgnoringCaseAt(const char (&str)[strLength], unsigned offset) const
|
| + {
|
| + return containsIgnoringCaseAt(str, strLength - 1, offset);
|
| + }
|
| +
|
| + bool containsIgnoringCaseAt(const char* str, size_t strLength, unsigned offset) const
|
| {
|
| - if (length() < strLength)
|
| + if (length() < strLength + offset)
|
| return false;
|
| - return is8Bit() ? WTF::equalIgnoringCase(str, characters8(), strLength) : WTF::equalIgnoringCase(str, characters16(), strLength);
|
| + return is8Bit() ? WTF::equalIgnoringCase(str, characters8() + offset, strLength) : WTF::equalIgnoringCase(str, characters16() + offset, strLength);
|
| }
|
|
|
| operator String() const { return is8Bit() ? String(m_data.characters8, m_length) : String(m_data.characters16, m_length); }
|
|
|