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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp

Issue 2618323002: Block animation of the SVGScriptElement (Closed)
Patch Set: Missing include Created 3 years, 11 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
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 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 if (m_type == AnimatedTransformList) { 186 if (m_type == AnimatedTransformList) {
187 m_type = AnimatedUnknown; 187 m_type = AnimatedUnknown;
188 m_cssPropertyId = CSSPropertyInvalid; 188 m_cssPropertyId = CSSPropertyInvalid;
189 } 189 }
190 } else { 190 } else {
191 m_type = SVGElement::animatedPropertyTypeForCSSAttribute(attributeName()); 191 m_type = SVGElement::animatedPropertyTypeForCSSAttribute(attributeName());
192 m_cssPropertyId = m_type != AnimatedUnknown 192 m_cssPropertyId = m_type != AnimatedUnknown
193 ? cssPropertyID(attributeName().localName()) 193 ? cssPropertyID(attributeName().localName())
194 : CSSPropertyInvalid; 194 : CSSPropertyInvalid;
195 } 195 }
196 // Blacklist <script> targets here for now to prevent unpleasantries. This
197 // also disallows the perfectly "valid" animation of 'className' on said
198 // element. If SVGScriptElement.href is transitioned off of SVGAnimatedHref,
199 // this can be removed.
200 if (isSVGScriptElement(*targetElement())) {
201 m_type = AnimatedUnknown;
202 m_cssPropertyId = CSSPropertyInvalid;
203 }
196 DCHECK(m_type != AnimatedPoint && m_type != AnimatedStringList && 204 DCHECK(m_type != AnimatedPoint && m_type != AnimatedStringList &&
197 m_type != AnimatedTransform && m_type != AnimatedTransformList); 205 m_type != AnimatedTransform && m_type != AnimatedTransformList);
198 } 206 }
199 207
200 void SVGAnimateElement::clearTargetProperty() { 208 void SVGAnimateElement::clearTargetProperty() {
201 m_targetProperty = nullptr; 209 m_targetProperty = nullptr;
202 m_type = AnimatedUnknown; 210 m_type = AnimatedUnknown;
203 m_cssPropertyId = CSSPropertyInvalid; 211 m_cssPropertyId = CSSPropertyInvalid;
204 } 212 }
205 213
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 DEFINE_TRACE(SVGAnimateElement) { 622 DEFINE_TRACE(SVGAnimateElement) {
615 visitor->trace(m_fromProperty); 623 visitor->trace(m_fromProperty);
616 visitor->trace(m_toProperty); 624 visitor->trace(m_toProperty);
617 visitor->trace(m_toAtEndOfDurationProperty); 625 visitor->trace(m_toAtEndOfDurationProperty);
618 visitor->trace(m_animatedValue); 626 visitor->trace(m_animatedValue);
619 visitor->trace(m_targetProperty); 627 visitor->trace(m_targetProperty);
620 SVGAnimationElement::trace(visitor); 628 SVGAnimationElement::trace(visitor);
621 } 629 }
622 630
623 } // namespace blink 631 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698