| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 { | 45 { |
| 46 return adoptRefWillBeNoop(new CSSValueList(SlashSeparator)); | 46 return adoptRefWillBeNoop(new CSSValueList(SlashSeparator)); |
| 47 } | 47 } |
| 48 | 48 |
| 49 iterator begin() { return m_values.begin(); } | 49 iterator begin() { return m_values.begin(); } |
| 50 iterator end() { return m_values.end(); } | 50 iterator end() { return m_values.end(); } |
| 51 const_iterator begin() const { return m_values.begin(); } | 51 const_iterator begin() const { return m_values.begin(); } |
| 52 const_iterator end() const { return m_values.end(); } | 52 const_iterator end() const { return m_values.end(); } |
| 53 | 53 |
| 54 size_t length() const { return m_values.size(); } | 54 size_t length() const { return m_values.size(); } |
| 55 CSSValue item(size_t index) { return m_values[index]; } | 55 const CSSValue& item(size_t index) const { return m_values[index]; } |
| 56 const CSSValue item(size_t index) const { return m_values[index]; } | |
| 57 NullableCSSValue itemWithBoundsCheck(size_t index) { return index < m_values
.size() ? NullableCSSValue(m_values[index]) : nullptr; } | 56 NullableCSSValue itemWithBoundsCheck(size_t index) { return index < m_values
.size() ? NullableCSSValue(m_values[index]) : nullptr; } |
| 58 const NullableCSSValue itemWithBoundsCheck(size_t index) const { return inde
x < m_values.size() ? NullableCSSValue(m_values[index]) : nullptr; } | 57 const NullableCSSValue itemWithBoundsCheck(size_t index) const { return inde
x < m_values.size() ? NullableCSSValue(m_values[index]) : nullptr; } |
| 59 | 58 |
| 60 void append(CSSValue value) { m_values.append(value); } | 59 void append(const CSSValue& value) { m_values.append(value); } |
| 61 void prepend(CSSValue value) { m_values.prepend(value); } | 60 void prepend(const CSSValue& value) { m_values.prepend(value); } |
| 62 bool removeAll(CSSValue); | 61 bool removeAll(const CSSValue&); |
| 63 bool hasValue(CSSValue) const; | 62 bool hasValue(const CSSValue&) const; |
| 64 PassRefPtrWillBeRawPtr<CSSValueList> copy(); | 63 PassRefPtrWillBeRawPtr<CSSValueList> copy(); |
| 65 | 64 |
| 66 String customCSSText() const; | 65 String customCSSText() const; |
| 67 bool equals(const CSSValueList&) const; | 66 bool equals(const CSSValueList&) const; |
| 68 | 67 |
| 69 bool hasFailedOrCanceledSubresources() const; | 68 bool hasFailedOrCanceledSubresources() const; |
| 70 | 69 |
| 71 DECLARE_TRACE_AFTER_DISPATCH(); | 70 DECLARE_TRACE_AFTER_DISPATCH(); |
| 72 | 71 |
| 73 protected: | 72 protected: |
| 74 CSSValueList(ClassType, ValueListSeparator); | 73 CSSValueList(ClassType, ValueListSeparator); |
| 75 | 74 |
| 76 private: | 75 private: |
| 77 explicit CSSValueList(ValueListSeparator); | 76 explicit CSSValueList(ValueListSeparator); |
| 78 | 77 |
| 79 WillBeHeapVector<CSSValue, 4> m_values; | 78 WillBeHeapVector<CSSValue, 4> m_values; |
| 80 }; | 79 }; |
| 81 | 80 |
| 82 DEFINE_CSS_VALUE_TYPE_CASTS(CSSValueList, isValueList()); | 81 DEFINE_CSS_VALUE_TYPE_CASTS(CSSValueList, isValueList()); |
| 83 | 82 |
| 84 } // namespace blink | 83 } // namespace blink |
| 85 | 84 |
| 86 #endif // CSSValueList_h | 85 #endif // CSSValueList_h |
| OLD | NEW |