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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp b/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp
index 90170a52bbdd646ca402846e91abb5acbfa81730..d2beb597d4f2461b5b5dc37e677716f91177e734 100644
--- a/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp
@@ -193,6 +193,14 @@ void SVGAnimateElement::resolveTargetProperty() {
? cssPropertyID(attributeName().localName())
: CSSPropertyInvalid;
}
+ // Blacklist <script> targets here for now to prevent unpleasantries. This
+ // also disallows the perfectly "valid" animation of 'className' on said
+ // element. If SVGScriptElement.href is transitioned off of SVGAnimatedHref,
+ // this can be removed.
+ if (isSVGScriptElement(*targetElement())) {
+ m_type = AnimatedUnknown;
+ m_cssPropertyId = CSSPropertyInvalid;
+ }
DCHECK(m_type != AnimatedPoint && m_type != AnimatedStringList &&
m_type != AnimatedTransform && m_type != AnimatedTransformList);
}

Powered by Google App Engine
This is Rietveld 408576698