| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 if (length() < strLength) | 114 if (length() < strLength) |
| 115 return false; | 115 return false; |
| 116 return is8Bit() ? WTF::equalIgnoringCase(str, characters8(), strLength)
: WTF::equalIgnoringCase(str, characters16(), strLength); | 116 return is8Bit() ? WTF::equalIgnoringCase(str, characters8(), strLength)
: WTF::equalIgnoringCase(str, characters16(), strLength); |
| 117 } | 117 } |
| 118 | 118 |
| 119 operator String() const { return is8Bit() ? String(m_data.characters8, m_len
gth) : StringImpl::create8BitIfPossible(m_data.characters16, m_length); } | 119 operator String() const { return is8Bit() ? String(m_data.characters8, m_len
gth) : StringImpl::create8BitIfPossible(m_data.characters16, m_length); } |
| 120 operator AtomicString() const { return is8Bit() ? AtomicString(m_data.charac
ters8, m_length) : AtomicString(m_data.characters16, m_length); } | 120 operator AtomicString() const { return is8Bit() ? AtomicString(m_data.charac
ters8, m_length) : AtomicString(m_data.characters16, m_length); } |
| 121 | 121 |
| 122 AtomicString atomicSubstring(unsigned position, unsigned length) const; | 122 AtomicString atomicSubstring(unsigned position, unsigned length) const; |
| 123 | 123 |
| 124 bool isFunction() const { return length() > 0 && (*this)[length() - 1] == '(
'; } |
| 125 |
| 124 union { | 126 union { |
| 125 const LChar* characters8; | 127 const LChar* characters8; |
| 126 const UChar* characters16; | 128 const UChar* characters16; |
| 127 } m_data; | 129 } m_data; |
| 128 unsigned m_length; | 130 unsigned m_length; |
| 129 bool m_is8Bit; | 131 bool m_is8Bit; |
| 130 }; | 132 }; |
| 131 | 133 |
| 132 struct CSSParserFunction; | 134 struct CSSParserFunction; |
| 133 | 135 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 inline void CSSParserValue::setFromFunction(CSSParserFunction* function) | 261 inline void CSSParserValue::setFromFunction(CSSParserFunction* function) |
| 260 { | 262 { |
| 261 id = CSSValueInvalid; | 263 id = CSSValueInvalid; |
| 262 this->function = function; | 264 this->function = function; |
| 263 unit = Function; | 265 unit = Function; |
| 264 } | 266 } |
| 265 | 267 |
| 266 } | 268 } |
| 267 | 269 |
| 268 #endif | 270 #endif |
| OLD | NEW |