Changeset 99838 in webkit
- Timestamp:
- Nov 10, 2011, 4:26:32 AM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r99836 r99838 1 2011-11-10 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Deploy SVGLengthContext in more places 4 https://bugs.webkit.org/show_bug.cgi?id=72012 5 6 Reviewed by Simon Hausmann. 7 8 Doesn't affect any tests. 9 10 * svg/SVGAnimatedLength.cpp: 11 (WebCore::SVGAnimatedLengthAnimator::calculateFromAndByValues): 12 (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue): 13 (WebCore::SVGAnimatedLengthAnimator::calculateDistance): 14 * svg/SVGAnimatedLengthList.cpp: 15 (WebCore::SVGAnimatedLengthListAnimator::calculateFromAndByValues): 16 (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue): 17 1 18 2011-11-10 Nikolas Zimmermann <nzimmermann@rim.com> 2 19 -
trunk/Source/WebCore/svg/SVGAnimatedLength.cpp
r95901 r99838 69 69 to = constructFromString(byString); 70 70 71 SVGLengthContext lengthContext(m_contextElement); 71 72 SVGLength& fromLength = from->length(); 72 73 SVGLength& toLength = to->length(); 73 74 ExceptionCode ec = 0; 74 toLength.setValue(toLength.value( m_contextElement) + fromLength.value(m_contextElement), m_contextElement, ec);75 toLength.setValue(toLength.value(lengthContext) + fromLength.value(lengthContext), lengthContext, ec); 75 76 ASSERT(!ec); 76 77 } … … 104 105 } 105 106 106 float result = animatedSVGLength.value(m_contextElement); 107 SVGLengthContext lengthContext(m_contextElement); 108 float result = animatedSVGLength.value(lengthContext); 107 109 SVGLengthType unitType = percentage < 0.5 ? fromSVGLength.unitType() : toSVGLength.unitType(); 108 SVGAnimatedNumberAnimator::calculateAnimatedNumber(animationElement, percentage, repeatCount, result, fromSVGLength.value( m_contextElement), toSVGLength.value(m_contextElement));110 SVGAnimatedNumberAnimator::calculateAnimatedNumber(animationElement, percentage, repeatCount, result, fromSVGLength.value(lengthContext), toSVGLength.value(lengthContext)); 109 111 110 112 ExceptionCode ec = 0; 111 animatedSVGLength.setValue( m_contextElement, result, m_lengthMode, unitType, ec);113 animatedSVGLength.setValue(lengthContext, result, m_lengthMode, unitType, ec); 112 114 ASSERT(!ec); 113 115 } … … 121 123 SVGLength from = SVGLength(lengthMode, fromString); 122 124 SVGLength to = SVGLength(lengthMode, toString); 123 return fabsf(to.value(m_contextElement) - from.value(m_contextElement)); 125 SVGLengthContext lengthContext(m_contextElement); 126 return fabsf(to.value(lengthContext) - from.value(lengthContext)); 124 127 } 125 128 -
trunk/Source/WebCore/svg/SVGAnimatedLengthList.cpp
r95901 r99838 67 67 if (itemsCount != toLengthList.size()) 68 68 return; 69 SVGLengthContext lengthContext(m_contextElement); 69 70 ExceptionCode ec = 0; 70 71 for (unsigned i = 0; i < itemsCount; ++i) { 71 toLengthList[i].setValue(toLengthList[i].value( m_contextElement) + fromLengthList[i].value(m_contextElement), m_contextElement, ec);72 toLengthList[i].setValue(toLengthList[i].value(lengthContext) + fromLengthList[i].value(lengthContext), lengthContext, ec); 72 73 ASSERT(!ec); 73 74 } … … 115 116 if (!animatedListSizeEqual) 116 117 animatedLengthList.clear(); 118 SVGLengthContext lengthContext(m_contextElement); 117 119 ExceptionCode ec = 0; 118 120 for (unsigned i = 0; i < itemsCount; ++i) { 119 float result = animatedListSizeEqual ? animatedLengthList[i].value( m_contextElement) : 0;121 float result = animatedListSizeEqual ? animatedLengthList[i].value(lengthContext) : 0; 120 122 SVGLengthType unitType = percentage < 0.5 ? fromLengthList[i].unitType() : toLengthList[i].unitType(); 121 SVGAnimatedNumberAnimator::calculateAnimatedNumber(animationElement, percentage, repeatCount, result, fromLengthList[i].value( m_contextElement), toLengthList[i].value(m_contextElement));123 SVGAnimatedNumberAnimator::calculateAnimatedNumber(animationElement, percentage, repeatCount, result, fromLengthList[i].value(lengthContext), toLengthList[i].value(lengthContext)); 122 124 if (!animatedListSizeEqual) 123 animatedLengthList.append(SVGLength( m_contextElement, result, m_lengthMode, unitType));125 animatedLengthList.append(SVGLength(lengthContext, result, m_lengthMode, unitType)); 124 126 else { 125 animatedLengthList[i].setValue( m_contextElement, result, m_lengthMode, unitType, ec);127 animatedLengthList[i].setValue(lengthContext, result, m_lengthMode, unitType, ec); 126 128 ASSERT(!ec); 127 129 }
Note:
See TracChangeset
for help on using the changeset viewer.