| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2011. 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 for (PropertiesVector::iterator vectorIt = vector->begin(); vectorIt != vect
orEnd; ++vectorIt) | 111 for (PropertiesVector::iterator vectorIt = vector->begin(); vectorIt != vect
orEnd; ++vectorIt) |
| 112 synchronizeProperty(contextElement, attributeName, *vectorIt); | 112 synchronizeProperty(contextElement, attributeName, *vectorIt); |
| 113 | 113 |
| 114 return true; | 114 return true; |
| 115 } | 115 } |
| 116 | 116 |
| 117 SVGAttributeToPropertyMap::PropertiesVector* SVGAttributeToPropertyMap::getOrCre
atePropertiesVector(const QualifiedName& attributeName) | 117 SVGAttributeToPropertyMap::PropertiesVector* SVGAttributeToPropertyMap::getOrCre
atePropertiesVector(const QualifiedName& attributeName) |
| 118 { | 118 { |
| 119 ASSERT(attributeName != anyQName()); | 119 ASSERT(attributeName != anyQName()); |
| 120 AttributeToPropertiesMap::AddResult addResult = m_map.add(attributeName, Pas
sOwnPtr<PropertiesVector>()); | 120 AttributeToPropertiesMap::AddResult addResult = m_map.add(attributeName, Pas
sOwnPtr<PropertiesVector>()); |
| 121 PropertiesVector* vector = addResult.iterator->value.get(); | 121 PropertiesVector* vector = addResult.storedValue->value.get(); |
| 122 if (addResult.isNewEntry) { | 122 if (addResult.isNewEntry) { |
| 123 ASSERT(!vector); | 123 ASSERT(!vector); |
| 124 vector = (addResult.iterator->value = adoptPtr(new PropertiesVector)).ge
t(); | 124 vector = (addResult.storedValue->value = adoptPtr(new PropertiesVector))
.get(); |
| 125 } | 125 } |
| 126 ASSERT(vector); | 126 ASSERT(vector); |
| 127 ASSERT(addResult.iterator->value.get() == vector); | 127 ASSERT(addResult.storedValue->value.get() == vector); |
| 128 return vector; | 128 return vector; |
| 129 } | 129 } |
| 130 | 130 |
| 131 void SVGAttributeToPropertyMap::synchronizeProperty(SVGElement* contextElement,
const QualifiedName& attributeName, const SVGPropertyInfo* info) | 131 void SVGAttributeToPropertyMap::synchronizeProperty(SVGElement* contextElement,
const QualifiedName& attributeName, const SVGPropertyInfo* info) |
| 132 { | 132 { |
| 133 ASSERT(info); | 133 ASSERT(info); |
| 134 ASSERT_UNUSED(attributeName, attributeName == info->attributeName); | 134 ASSERT_UNUSED(attributeName, attributeName == info->attributeName); |
| 135 ASSERT(info->synchronizeProperty); | 135 ASSERT(info->synchronizeProperty); |
| 136 (*info->synchronizeProperty)(contextElement); | 136 (*info->synchronizeProperty)(contextElement); |
| 137 } | 137 } |
| 138 | 138 |
| 139 PassRefPtr<SVGAnimatedProperty> SVGAttributeToPropertyMap::animatedProperty(SVGE
lement* contextElement, const QualifiedName& attributeName, const SVGPropertyInf
o* info) | 139 PassRefPtr<SVGAnimatedProperty> SVGAttributeToPropertyMap::animatedProperty(SVGE
lement* contextElement, const QualifiedName& attributeName, const SVGPropertyInf
o* info) |
| 140 { | 140 { |
| 141 ASSERT(info); | 141 ASSERT(info); |
| 142 ASSERT_UNUSED(attributeName, attributeName == info->attributeName); | 142 ASSERT_UNUSED(attributeName, attributeName == info->attributeName); |
| 143 ASSERT(info->lookupOrCreateWrapperForAnimatedProperty); | 143 ASSERT(info->lookupOrCreateWrapperForAnimatedProperty); |
| 144 return (*info->lookupOrCreateWrapperForAnimatedProperty)(contextElement); | 144 return (*info->lookupOrCreateWrapperForAnimatedProperty)(contextElement); |
| 145 } | 145 } |
| 146 | 146 |
| 147 } | 147 } |
| OLD | NEW |