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

Side by Side Diff: Source/core/svg/SVGAnimationElement.cpp

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGAnimationElement.h ('k') | Source/core/svg/SVGCircleElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 29 matching lines...) Expand all
40 namespace WebCore { 40 namespace WebCore {
41 41
42 // Animated property definitions 42 // Animated property definitions
43 DEFINE_ANIMATED_BOOLEAN(SVGAnimationElement, SVGNames::externalResourcesRequired Attr, ExternalResourcesRequired, externalResourcesRequired) 43 DEFINE_ANIMATED_BOOLEAN(SVGAnimationElement, SVGNames::externalResourcesRequired Attr, ExternalResourcesRequired, externalResourcesRequired)
44 44
45 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGAnimationElement) 45 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGAnimationElement)
46 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) 46 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
47 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests) 47 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests)
48 END_REGISTER_ANIMATED_PROPERTIES 48 END_REGISTER_ANIMATED_PROPERTIES
49 49
50 SVGAnimationElement::SVGAnimationElement(const QualifiedName& tagName, Document* document) 50 SVGAnimationElement::SVGAnimationElement(const QualifiedName& tagName, Document& document)
51 : SVGSMILElement(tagName, document) 51 : SVGSMILElement(tagName, document)
52 , m_fromPropertyValueType(RegularPropertyValue) 52 , m_fromPropertyValueType(RegularPropertyValue)
53 , m_toPropertyValueType(RegularPropertyValue) 53 , m_toPropertyValueType(RegularPropertyValue)
54 , m_animationValid(false) 54 , m_animationValid(false)
55 , m_attributeType(AttributeTypeAuto) 55 , m_attributeType(AttributeTypeAuto)
56 , m_hasInvalidCSSAttributeType(false) 56 , m_hasInvalidCSSAttributeType(false)
57 , m_calcMode(CalcModeLinear) 57 , m_calcMode(CalcModeLinear)
58 , m_animationMode(NoAnimation) 58 , m_animationMode(NoAnimation)
59 { 59 {
60 ScriptWrappable::init(this); 60 ScriptWrappable::init(this);
61 registerAnimatedPropertiesForSVGAnimationElement(); 61 registerAnimatedPropertiesForSVGAnimationElement();
62 62
63 UseCounter::count(document, UseCounter::SVGAnimationElement); 63 UseCounter::count(&document, UseCounter::SVGAnimationElement);
64 } 64 }
65 65
66 static void parseKeyTimes(const String& string, Vector<float>& result, bool veri fyOrder) 66 static void parseKeyTimes(const String& string, Vector<float>& result, bool veri fyOrder)
67 { 67 {
68 result.clear(); 68 result.clear();
69 Vector<String> parseList; 69 Vector<String> parseList;
70 string.split(';', parseList); 70 string.split(';', parseList);
71 for (unsigned n = 0; n < parseList.size(); ++n) { 71 for (unsigned n = 0; n < parseList.size(); ++n) {
72 String timeString = parseList[n]; 72 String timeString = parseList[n];
73 bool ok; 73 bool ok;
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 SVGSMILElement::setAttributeName(attributeName); 695 SVGSMILElement::setAttributeName(attributeName);
696 checkInvalidCSSAttributeType(targetElement()); 696 checkInvalidCSSAttributeType(targetElement());
697 } 697 }
698 698
699 void SVGAnimationElement::checkInvalidCSSAttributeType(SVGElement* target) 699 void SVGAnimationElement::checkInvalidCSSAttributeType(SVGElement* target)
700 { 700 {
701 m_hasInvalidCSSAttributeType = target && hasValidAttributeName() && attribut eType() == AttributeTypeCSS && !isTargetAttributeCSSProperty(target, attributeNa me()); 701 m_hasInvalidCSSAttributeType = target && hasValidAttributeName() && attribut eType() == AttributeTypeCSS && !isTargetAttributeCSSProperty(target, attributeNa me());
702 } 702 }
703 703
704 } 704 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAnimationElement.h ('k') | Source/core/svg/SVGCircleElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698