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

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: 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 ). 472 // The following collide with CSS properties or the Web Animations API (offset ).
473 var svgPrefixedAttributes = [ 473 var svgPrefixedAttributes = [
474 'cx', 474 'cx',
475 'cy', 475 'cy',
476 'height', 476 'height',
477 'offset', 477 'offset',
478 'offset',
479 'order', 478 'order',
480 'r', 479 'r',
481 'rx', 480 'rx',
482 'ry', 481 'ry',
483 'transform', 482 'transform',
484 'width', 483 'width',
485 'x', 484 'x',
486 'y', 485 'y',
486 'rotate',
487 'scale'
487 ]; 488 ];
488 489
489 function makeKeyframes(target, attributeName, params) { 490 function makeKeyframes(target, attributeName, params) {
490 if (svgPrefixedAttributes.indexOf(attributeName) !== -1) 491 if (svgPrefixedAttributes.indexOf(attributeName) !== -1)
491 attributeName = 'svg' + attributeName[0].toUpperCase() + attributeName.sli ce(1); 492 attributeName = 'svg' + attributeName[0].toUpperCase() + attributeName.sli ce(1);
492 493
493 var keyframes = [{}, {}]; 494 var keyframes = [{}, {}];
494 if (attributeName === 'class') { 495 if (attributeName === 'class') {
495 // Preserve the existing classes as we use them to select elements. 496 // Preserve the existing classes as we use them to select elements.
496 keyframes[0][attributeName] = target['className'].baseVal + ' ' + params.f rom; 497 keyframes[0][attributeName] = target['className'].baseVal + ' ' + params.f rom;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 setTimeout(function() { 673 setTimeout(function() {
673 if (finished) { 674 if (finished) {
674 return; 675 return;
675 } 676 }
676 finishTest(); 677 finishTest();
677 }, 5000); 678 }, 5000);
678 } 679 }
679 680
680 window.assertAttributeInterpolation = assertAttributeInterpolation; 681 window.assertAttributeInterpolation = assertAttributeInterpolation;
681 })(); 682 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698