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, 2010 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 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 30 matching lines...) Expand all Loading... |
41 CSSValueList::CSSValueList(ValueListSeparator listSeparator) | 41 CSSValueList::CSSValueList(ValueListSeparator listSeparator) |
42 : CSSValue(ValueListClass) { | 42 : CSSValue(ValueListClass) { |
43 m_valueListSeparator = listSeparator; | 43 m_valueListSeparator = listSeparator; |
44 } | 44 } |
45 | 45 |
46 bool CSSValueList::removeAll(const CSSValue& val) { | 46 bool CSSValueList::removeAll(const CSSValue& val) { |
47 bool found = false; | 47 bool found = false; |
48 for (int index = m_values.size() - 1; index >= 0; --index) { | 48 for (int index = m_values.size() - 1; index >= 0; --index) { |
49 Member<const CSSValue>& value = m_values.at(index); | 49 Member<const CSSValue>& value = m_values.at(index); |
50 if (value && *value == val) { | 50 if (value && *value == val) { |
51 m_values.remove(index); | 51 m_values.erase(index); |
52 found = true; | 52 found = true; |
53 } | 53 } |
54 } | 54 } |
55 | 55 |
56 return found; | 56 return found; |
57 } | 57 } |
58 | 58 |
59 bool CSSValueList::hasValue(const CSSValue& val) const { | 59 bool CSSValueList::hasValue(const CSSValue& val) const { |
60 for (size_t index = 0; index < m_values.size(); index++) { | 60 for (size_t index = 0; index < m_values.size(); index++) { |
61 const Member<const CSSValue>& value = m_values.at(index); | 61 const Member<const CSSValue>& value = m_values.at(index); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 for (const auto& value : m_values) | 137 for (const auto& value : m_values) |
138 value->reResolveUrl(document); | 138 value->reResolveUrl(document); |
139 } | 139 } |
140 | 140 |
141 DEFINE_TRACE_AFTER_DISPATCH(CSSValueList) { | 141 DEFINE_TRACE_AFTER_DISPATCH(CSSValueList) { |
142 visitor->trace(m_values); | 142 visitor->trace(m_values); |
143 CSSValue::traceAfterDispatch(visitor); | 143 CSSValue::traceAfterDispatch(visitor); |
144 } | 144 } |
145 | 145 |
146 } // namespace blink | 146 } // namespace blink |
OLD | NEW |