Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: Source/WebCore/svg/SVGAnimateMotionElement.cpp

Issue 11229037: Merge 129670 - Refactor SMILTimeContainer to maintain animation information instead of recalculatin… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 || targetElement->hasTagName(textTag) 80 || targetElement->hasTagName(textTag)
81 || targetElement->hasTagName(clipPathTag) 81 || targetElement->hasTagName(clipPathTag)
82 || targetElement->hasTagName(maskTag) 82 || targetElement->hasTagName(maskTag)
83 || targetElement->hasTagName(aTag) 83 || targetElement->hasTagName(aTag)
84 || targetElement->hasTagName(foreignObjectTag) 84 || targetElement->hasTagName(foreignObjectTag)
85 ) 85 )
86 return true; 86 return true;
87 return false; 87 return false;
88 } 88 }
89 89
90 bool SVGAnimateMotionElement::hasValidAttributeName()
91 {
92 // AnimateMotion does not use attributeName so it is always valid.
93 return true;
94 }
95
90 bool SVGAnimateMotionElement::isSupportedAttribute(const QualifiedName& attrName ) 96 bool SVGAnimateMotionElement::isSupportedAttribute(const QualifiedName& attrName )
91 { 97 {
92 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 98 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
93 if (supportedAttributes.isEmpty()) 99 if (supportedAttributes.isEmpty())
94 supportedAttributes.add(SVGNames::pathAttr); 100 supportedAttributes.add(SVGNames::pathAttr);
95 return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslato r>(attrName); 101 return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslato r>(attrName);
96 } 102 }
97 103
98 void SVGAnimateMotionElement::parseAttribute(const Attribute& attribute) 104 void SVGAnimateMotionElement::parseAttribute(const Attribute& attribute)
99 { 105 {
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 if (!parsePoint(fromString, from)) 313 if (!parsePoint(fromString, from))
308 return -1; 314 return -1;
309 if (!parsePoint(toString, to)) 315 if (!parsePoint(toString, to))
310 return -1; 316 return -1;
311 FloatSize diff = to - from; 317 FloatSize diff = to - from;
312 return sqrtf(diff.width() * diff.width() + diff.height() * diff.height()); 318 return sqrtf(diff.width() * diff.width() + diff.height() * diff.height());
313 } 319 }
314 320
315 } 321 }
316 #endif // ENABLE(SVG) 322 #endif // ENABLE(SVG)
OLDNEW
« no previous file with comments | « Source/WebCore/svg/SVGAnimateMotionElement.h ('k') | Source/WebCore/svg/animation/SMILTimeContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698