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

Unified Diff: LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js

Issue 1151573017: Web Animations: Always use svg prefix when animating SVG attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Only first letter changes case when svg prefix is added/removed Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/core/animation/EffectInput.cpp » ('j') | Source/core/animation/EffectInput.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js
diff --git a/LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js b/LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js
index d4078ab3522f69aaacadfc3c482f8593f21f70a6..22cb9106b2bc5303166985e41e6ee0553dd0dd9b 100644
--- a/LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js
+++ b/LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js
@@ -469,29 +469,12 @@
}
}
- // The following collide with CSS properties or the Web Animations API (offset).
- var svgPrefixedAttributes = [
- 'cx',
- 'cy',
- 'height',
- 'offset',
- 'offset',
- 'order',
- 'r',
- 'rx',
- 'ry',
- 'transform',
- 'width',
- 'x',
- 'y',
- ];
-
function makeKeyframes(target, attributeName, params) {
- if (svgPrefixedAttributes.indexOf(attributeName) !== -1)
- attributeName = 'svg' + attributeName[0].toUpperCase() + attributeName.slice(1);
+ // Replace 'transform' with 'svgTransform', etc. This avoids collisions with CSS properties or the Web Animations API (offset).
+ attributeName = 'svg' + attributeName[0].toUpperCase() + attributeName.slice(1);
alancutter (OOO until 2018) 2015/06/09 06:25:05 Nit: Store this in a different variable called pre
var keyframes = [{}, {}];
- if (attributeName === 'class') {
+ if (attributeName === 'svgClass') {
// Preserve the existing classes as we use them to select elements.
keyframes[0][attributeName] = target['className'].baseVal + ' ' + params.from;
keyframes[1][attributeName] = target['className'].baseVal + ' ' + params.to;
« no previous file with comments | « no previous file | Source/core/animation/EffectInput.cpp » ('j') | Source/core/animation/EffectInput.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698