Changeset 175525 in webkit
- Timestamp:
- Nov 4, 2014, 1:20:52 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/svg/animations/animate-marker-orienttype-1-expected.txt (added)
-
LayoutTests/svg/animations/animate-marker-orienttype-1.html (added)
-
LayoutTests/svg/animations/animate-marker-orienttype-2-expected.txt (added)
-
LayoutTests/svg/animations/animate-marker-orienttype-2.html (added)
-
LayoutTests/svg/animations/animate-marker-orienttype-3-expected.txt (added)
-
LayoutTests/svg/animations/animate-marker-orienttype-3.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/svg/SVGAnimatedAngle.cpp (modified) (1 diff)
-
Source/WebCore/svg/SVGMarkerElement.cpp (modified) (1 diff)
-
Source/WebCore/svg/SVGMarkerElement.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r175511 r175525 1 2014-11-04 Nikos Andrkos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au> 2 3 Fix animation of orient attribute on marker element 4 https://bugs.webkit.org/show_bug.cgi?id=137942 5 6 Reviewed by Dirk Schulze. 7 8 Test the rendered result of the animation of the orient attribute. 9 Existing tests were only testing the animated value in the DOM. 10 11 * svg/animations/animate-marker-orienttype-1-expected.txt: Added. 12 * svg/animations/animate-marker-orienttype-1.html: Added. 13 * svg/animations/animate-marker-orienttype-2-expected.txt: Added. 14 * svg/animations/animate-marker-orienttype-2.html: Added. 15 * svg/animations/animate-marker-orienttype-3-expected.txt: Added. 16 * svg/animations/animate-marker-orienttype-3.html: Added. 17 1 18 2014-11-03 Shivakumar JM <shiva.jm@samsung.com> 2 19 -
trunk/Source/WebCore/ChangeLog
r175513 r175525 1 2014-11-04 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au> 2 3 Fix animation of orient attribute on marker element 4 https://bugs.webkit.org/show_bug.cgi?id=137942 5 6 Reviewed by Dirk Schulze. 7 8 Fixed implementation of SVG animated angles and the SVG 9 marker element orient attribute. 10 SVG animated angle was missing the logic to support animation 11 from auto to a numeric angle value - this is now added. 12 The SVG marker element getter for orientType was not returning 13 the animated value for orientType so in some cases (i.e. when 14 the initial value and the animated values were of different types) 15 the animation was not being rendered - although it was running. 16 17 Tests: svg/animations/animate-marker-orienttype-1.html 18 svg/animations/animate-marker-orienttype-2.html 19 svg/animations/animate-marker-orienttype-3.html 20 21 * svg/SVGAnimatedAngle.cpp: 22 (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue): 23 Added logic to support auto to angle animation. 24 * svg/SVGMarkerElement.cpp: 25 (WebCore::SVGMarkerElement::orientType): 26 This method now returns the animated value if an animation is 27 running. 28 * svg/SVGMarkerElement.h: 29 1 30 2014-11-03 Chris Dumez <cdumez@apple.com> 2 31 -
trunk/Source/WebCore/svg/SVGAnimatedAngle.cpp
r174050 r175525 97 97 98 98 if (fromAngleAndEnumeration.second != toAngleAndEnumeration.second) { 99 // Animating from eg. auto to 90deg, or auto to 90deg. 100 if (fromAngleAndEnumeration.second == SVGMarkerOrientAngle) { 101 // Animating from an angle value to eg. 'auto' - this disabled additive as 'auto' is a keyword.. 102 if (toAngleAndEnumeration.second == SVGMarkerOrientAuto) { 103 if (percentage < 0.5f) { 104 animatedAngleAndEnumeration.first = fromAngleAndEnumeration.first; 105 animatedAngleAndEnumeration.second = SVGMarkerOrientAngle; 106 return; 107 } 99 // Discrete animation - no linear interpolation possible between values (e.g. auto to angle). 100 if (percentage < 0.5f) { 101 animatedAngleAndEnumeration.second = fromAngleAndEnumeration.second; 102 if (fromAngleAndEnumeration.second == SVGMarkerOrientAngle) 103 animatedAngleAndEnumeration.first = fromAngleAndEnumeration.first; 104 else 108 105 animatedAngleAndEnumeration.first.setValue(0); 109 animatedAngleAndEnumeration.second = SVGMarkerOrientAuto;110 return;111 }112 animatedAngleAndEnumeration.first.setValue(0);113 animatedAngleAndEnumeration.second = SVGMarkerOrientUnknown;114 106 return; 115 107 } 108 animatedAngleAndEnumeration.second = toAngleAndEnumeration.second; 109 if (toAngleAndEnumeration.second == SVGMarkerOrientAngle) 110 animatedAngleAndEnumeration.first = toAngleAndEnumeration.first; 111 else 112 animatedAngleAndEnumeration.first.setValue(0); 113 return; 116 114 } 117 115 -
trunk/Source/WebCore/svg/SVGMarkerElement.cpp
r173859 r175525 249 249 (&ownerType, orientTypePropertyInfo(), ownerType.m_orientType.value); 250 250 } 251 251 252 SVGMarkerOrientType& SVGMarkerElement::orientType() const 253 { 254 if (SVGAnimatedEnumeration* wrapper = SVGAnimatedProperty::lookupWrapper<UseOwnerType, SVGAnimatedEnumeration>(this, orientTypePropertyInfo())) { 255 if (wrapper->isAnimating()) { 256 ASSERT(wrapper->currentAnimatedValue() >= 0 && wrapper->currentAnimatedValue() < SVGMarkerOrientMax); 257 return reinterpret_cast<SVGMarkerOrientType&>(wrapper->currentAnimatedValue()); 258 } 259 } 260 return m_orientType.value; 261 } 262 252 263 PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType>> SVGMarkerElement::orientTypeAnimated() 253 264 { -
trunk/Source/WebCore/svg/SVGMarkerElement.h
r173804 r175525 43 43 SVGMarkerOrientUnknown = 0, 44 44 SVGMarkerOrientAuto, 45 SVGMarkerOrientAngle 45 SVGMarkerOrientAngle, 46 47 // Add new elements before here. 48 SVGMarkerOrientMax 46 49 }; 47 50 … … 156 159 static void synchronizeOrientType(SVGElement* contextElement); 157 160 static PassRefPtr<SVGAnimatedProperty> lookupOrCreateOrientTypeWrapper(SVGElement* contextElement); 158 SVGMarkerOrientType& orientType() const { return m_orientType.value; }161 SVGMarkerOrientType& orientType() const; 159 162 SVGMarkerOrientType& orientTypeBaseValue() const { return m_orientType.value; } 160 163 void setOrientTypeBaseValue(const SVGMarkerOrientType& type) { m_orientType.value = type; }
Note:
See TracChangeset
for help on using the changeset viewer.