| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 using Base::m_role; | 37 using Base::m_role; |
| 38 using Base::m_values; | 38 using Base::m_values; |
| 39 | 39 |
| 40 static PassRefPtr<SVGStaticListPropertyTearOff<PropertyType> > create(SVGEle
ment* contextElement, PropertyType& values) | 40 static PassRefPtr<SVGStaticListPropertyTearOff<PropertyType> > create(SVGEle
ment* contextElement, PropertyType& values) |
| 41 { | 41 { |
| 42 ASSERT(contextElement); | 42 ASSERT(contextElement); |
| 43 return adoptRef(new SVGStaticListPropertyTearOff<PropertyType>(contextEl
ement, values)); | 43 return adoptRef(new SVGStaticListPropertyTearOff<PropertyType>(contextEl
ement, values)); |
| 44 } | 44 } |
| 45 | 45 |
| 46 SVGElement* contextElement() const { return m_contextElement; } | |
| 47 | |
| 48 // SVGList API | 46 // SVGList API |
| 49 void clear(ExceptionState& es) | 47 void clear(ExceptionState& es) |
| 50 { | 48 { |
| 51 Base::clearValues(es); | 49 Base::clearValues(es); |
| 52 } | 50 } |
| 53 | 51 |
| 54 ListItemType initialize(const ListItemType& newItem, ExceptionState& es) | 52 ListItemType initialize(const ListItemType& newItem, ExceptionState& es) |
| 55 { | 53 { |
| 56 return Base::initializeValues(newItem, es); | 54 return Base::initializeValues(newItem, es); |
| 57 } | 55 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 } | 87 } |
| 90 | 88 |
| 91 virtual bool isReadOnly() const | 89 virtual bool isReadOnly() const |
| 92 { | 90 { |
| 93 return m_role == AnimValRole; | 91 return m_role == AnimValRole; |
| 94 } | 92 } |
| 95 | 93 |
| 96 virtual void commitChange() | 94 virtual void commitChange() |
| 97 { | 95 { |
| 98 ASSERT(m_values); | 96 ASSERT(m_values); |
| 99 ASSERT(m_contextElement); | 97 m_values->commitChange(m_contextElement.get()); |
| 100 m_values->commitChange(m_contextElement); | |
| 101 } | 98 } |
| 102 | 99 |
| 103 virtual bool processIncomingListItemValue(const ListItemType&, unsigned*) | 100 virtual bool processIncomingListItemValue(const ListItemType&, unsigned*) |
| 104 { | 101 { |
| 105 // no-op for static lists | 102 // no-op for static lists |
| 106 return true; | 103 return true; |
| 107 } | 104 } |
| 108 | 105 |
| 109 virtual bool processIncomingListItemWrapper(RefPtr<ListItemTearOff>&, unsign
ed*) | 106 virtual bool processIncomingListItemWrapper(RefPtr<ListItemTearOff>&, unsign
ed*) |
| 110 { | 107 { |
| 111 ASSERT_NOT_REACHED(); | 108 ASSERT_NOT_REACHED(); |
| 112 return true; | 109 return true; |
| 113 } | 110 } |
| 114 | 111 |
| 115 private: | 112 private: |
| 116 SVGElement* m_contextElement; | 113 RefPtr<SVGElement> m_contextElement; |
| 117 }; | 114 }; |
| 118 | 115 |
| 119 } | 116 } |
| 120 | 117 |
| 121 #endif // SVGStaticListPropertyTearOff_h | 118 #endif // SVGStaticListPropertyTearOff_h |
| OLD | NEW |