Changeset 31334 in webkit
- Timestamp:
- Mar 26, 2008 5:21:17 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r31333 r31334 1 2008-03-26 Antti Koivisto <antti@apple.com> 2 3 Reviewed by Anders. 4 5 http://bugs.webkit.org/show_bug.cgi?id=17077 6 Bug 17077: SVG SMIL animation is currently broken (and turned off) (affects Acid3 tests 75 and 76) 7 8 - enable SVG animation support. 9 - basic implementation of beginElement()/endElement(). 10 11 Animation definitely will need more work than this, but it is a start! 12 13 * Configurations/WebCore.xcconfig: 14 * svg/SVGAnimationElement.cpp: 15 (WebCore::SVGAnimationElement::SVGAnimationElement): 16 (WebCore::SVGAnimationElement::updateAnimatedValueForElapsedSeconds): 17 (WebCore::SVGAnimationElement::beginElement): 18 (WebCore::SVGAnimationElement::beginElementAt): 19 (WebCore::SVGAnimationElement::endElement): 20 (WebCore::SVGAnimationElement::endElementAt): 21 * svg/SVGAnimationElement.h: 22 1 23 2008-03-26 Mark Rowe <mrowe@apple.com> 2 24 -
trunk/WebCore/Configurations/WebCore.xcconfig
r31195 r31334 6 6 EXPORTED_SYMBOLS_FILE_ppc64 = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCore.LP64.exp; 7 7 EXPORTED_SYMBOLS_FILE_x86_64 = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCore.LP64.exp; 8 FEATURE_DEFINES = ENABLE_CROSS_DOCUMENT_MESSAGING ENABLE_DATABASE ENABLE_ICONDATABASE ENABLE_SVG ENABLE_SVG_AS_IMAGE ENABLE_SVG_FONTS ENABLE_SVG_FOREIGN_OBJECT ENABLE_SVG_USE ENABLE_VIDEO ENABLE_XPATH ENABLE_XSLT ;8 FEATURE_DEFINES = ENABLE_CROSS_DOCUMENT_MESSAGING ENABLE_DATABASE ENABLE_ICONDATABASE ENABLE_SVG ENABLE_SVG_AS_IMAGE ENABLE_SVG_FONTS ENABLE_SVG_FOREIGN_OBJECT ENABLE_SVG_USE ENABLE_VIDEO ENABLE_XPATH ENABLE_XSLT ENABLE_SVG_ANIMATION; 9 9 GCC_PREFIX_HEADER = WebCorePrefix.h; 10 10 GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(FEATURE_DEFINES) $(GCC_PREPROCESSOR_DEFINITIONS); -
trunk/WebCore/svg/SVGAnimationElement.cpp
r31315 r31334 29 29 #include "Document.h" 30 30 #include "FloatConversion.h" 31 #include "SVGNames.h" 31 32 #include "SVGParserUtilities.h" 32 33 #include "SVGSVGElement.h" … … 42 43 43 44 namespace WebCore { 45 46 using namespace SVGNames; 44 47 45 48 SVGAnimationElement::SVGAnimationElement(const QualifiedName& tagName, Document* doc) … … 63 66 , m_repetitions(0) 64 67 , m_repeatCount(0) 68 , m_animationBegin(DBL_MAX) 69 , m_animationEnd(DBL_MAX) 65 70 { 66 71 … … 730 735 // #1 (duration > 0) -> fine 731 736 // #2 (duration <= 0.0 && end > 0) -> fine 732 if ((m_simpleDuration <= 0.0 && m_end <= 0.0) || (isIndefinite(m_simpleDuration) && m_end <= 0.0)) 737 // FIXME: This allows indefinite duration for the <set> element, not sure if it should be allowed for others too. 738 // FIXME: Value won't naturally animate in this case so keeping the timer repeating is sort of pointless. 739 if ((m_simpleDuration <= 0.0 && m_end <= 0.0) || (isIndefinite(m_simpleDuration) && m_end <= 0.0 && !hasTagName(setTag))) 733 740 return false; // Ignore dur="0" or dur="-neg" 734 741 735 double percentage = calculateTimePercentage(elapsedSeconds, m_begin, m_end, m_simpleDuration, m_repetitions); 742 if (isIndefinite(m_animationBegin)) 743 m_animationBegin = m_begin; 744 745 double percentage = calculateTimePercentage(elapsedSeconds, m_animationBegin, m_end, m_simpleDuration, m_repetitions); 736 746 737 747 if (percentage <= 1.0 || connectedToTimer()) 738 748 handleTimerEvent(elapsedSeconds, percentage); 739 749 750 if (elapsedSeconds > m_animationEnd) { 751 if (connectedToTimer()) 752 disconnectTimer(); 753 m_animationEnd = DBL_MAX; 754 } 755 740 756 return true; // value was updated, need to apply 741 757 } … … 743 759 bool SVGAnimationElement::beginElement(ExceptionCode& ec) 744 760 { 761 // FIXME: Should this be synchronous? 762 return beginElementAt(0, ec); 763 } 764 765 bool SVGAnimationElement::beginElementAt(float offset, ExceptionCode& ec) 766 { 767 // FIXME: Handle negative offsets correctly. 768 // In general we need to make SMIL concepts like "active duration" explicit in the code 769 if (offset < 0) 770 offset = 0; 771 772 if (connectedToTimer()) 773 return false; 774 775 m_animationBegin = offset; 776 if (ownerSVGElement()) { 777 ownerSVGElement()->timeScheduler()->addTimer(this, offset); 778 ownerSVGElement()->timeScheduler()->startAnimations(); 779 connectTimer(); 780 } else 781 return false; 782 745 783 return false; 746 784 } 747 785 748 bool SVGAnimationElement::beginElementAt(float offset, ExceptionCode& ec)749 {750 return false;751 }752 753 786 bool SVGAnimationElement::endElement(ExceptionCode& ec) 754 787 { 755 return false; 788 // FIXME: Should this be synchronous? 789 return endElementAt(0, ec); 756 790 } 757 791 758 792 bool SVGAnimationElement::endElementAt(float offset, ExceptionCode& ec) 759 793 { 760 return false; 794 if (offset < 0) 795 return false; 796 if (!connectedToTimer()) 797 return false; 798 m_animationEnd = ownerSVGElement()->timeScheduler()->elapsed() + offset; 799 return true; 761 800 } 762 801 -
trunk/WebCore/svg/SVGAnimationElement.h
r31315 r31334 192 192 FloatPoint control2; 193 193 }; 194 195 double m_animationBegin; 196 double m_animationEnd; 197 194 198 Vector<KeySpline> m_keySplines; 195 199 }; -
trunk/WebKitTools/ChangeLog
r31308 r31334 1 2008-03-26 Antti Koivisto <antti@apple.com> 2 3 Reviewed by Anders. 4 5 Enable SVG animation support by default. 6 7 * Scripts/build-webkit: 8 1 9 2008-03-25 Adam Roben <aroben@apple.com> 2 10 -
trunk/WebKitTools/Scripts/build-webkit
r31278 r31334 45 45 my $svgSupport = 1; 46 46 my $svgExperimentalSupport = 0; 47 my $svgAnimationSupport = $svgExperimentalSupport;47 my $svgAnimationSupport = 1; 48 48 my $svgFiltersSupport = $svgExperimentalSupport; 49 49 my $svgForeignObjectSupport = 1;
Note: See TracChangeset
for help on using the changeset viewer.