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

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

Issue 1158603003: CSS Independent Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Correct equality operators and remove dependencies on size() in parser 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 (function() { 6 (function() {
7 var testCount = 0; 7 var testCount = 0;
8 var animationEventCount = 0; 8 var animationEventCount = 0;
9 9
10 var durationSeconds = 0.001; 10 var durationSeconds = 0.001;
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 var setElement = document.createElementNS(svgNamespace, 'set'); 462 var setElement = document.createElementNS(svgNamespace, 'set');
463 setElement.setAttribute('attributeName', namespacedAttributeName(attribute Name)); 463 setElement.setAttribute('attributeName', namespacedAttributeName(attribute Name));
464 setElement.setAttribute('attributeType', 'XML'); 464 setElement.setAttribute('attributeType', 'XML');
465 setElement.setAttribute('to', expectation); 465 setElement.setAttribute('to', expectation);
466 element.appendChild(setElement); 466 element.appendChild(setElement);
467 } else { 467 } else {
468 element.setAttribute(attributeName, expectation); 468 element.setAttribute(attributeName, expectation);
469 } 469 }
470 } 470 }
471 471
472 // The following collide with CSS properties or the Web Animations API (offset ).
Eric Willigers 2015/06/11 02:15:19 I recently made a change that retired svgPrefixedA
soonm 2015/06/11 23:31:03 Done - Reverted my change to match master.
473 var svgPrefixedAttributes = [
474 'cx',
475 'cy',
476 'height',
477 'offset',
478 'order',
479 'r',
480 'rx',
481 'ry',
482 'transform',
483 'width',
484 'x',
485 'y',
486 'rotate',
487 'scale'
488 ];
489
472 function makeKeyframes(target, attributeName, params) { 490 function makeKeyframes(target, attributeName, params) {
473 // Replace 'transform' with 'svgTransform', etc. This avoids collisions with CSS properties or the Web Animations API (offset). 491 // Replace 'transform' with 'svgTransform', etc. This avoids collisions with CSS properties or the Web Animations API (offset).
474 attributeName = 'svg' + attributeName[0].toUpperCase() + attributeName.slice (1); 492 attributeName = 'svg' + attributeName[0].toUpperCase() + attributeName.slice (1);
475 493
476 var keyframes = [{}, {}]; 494 var keyframes = [{}, {}];
477 if (attributeName === 'svgClass') { 495 if (attributeName === 'svgClass') {
478 // Preserve the existing classes as we use them to select elements. 496 // Preserve the existing classes as we use them to select elements.
479 keyframes[0][attributeName] = target['className'].baseVal + ' ' + params.f rom; 497 keyframes[0][attributeName] = target['className'].baseVal + ' ' + params.f rom;
480 keyframes[1][attributeName] = target['className'].baseVal + ' ' + params.t o; 498 keyframes[1][attributeName] = target['className'].baseVal + ' ' + params.t o;
481 } else { 499 } else {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 setTimeout(function() { 673 setTimeout(function() {
656 if (finished) { 674 if (finished) {
657 return; 675 return;
658 } 676 }
659 finishTest(); 677 finishTest();
660 }, 5000); 678 }, 5000);
661 } 679 }
662 680
663 window.assertAttributeInterpolation = assertAttributeInterpolation; 681 window.assertAttributeInterpolation = assertAttributeInterpolation;
664 })(); 682 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698