| OLD | NEW |
| 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 elements.push(transform.matrix.f); | 362 elements.push(transform.matrix.f); |
| 363 } | 363 } |
| 364 return String(elements); | 364 return String(elements); |
| 365 } | 365 } |
| 366 | 366 |
| 367 var svgNamespace = 'http://www.w3.org/2000/svg'; | 367 var svgNamespace = 'http://www.w3.org/2000/svg'; |
| 368 var xlinkNamespace = 'http://www.w3.org/1999/xlink'; | 368 var xlinkNamespace = 'http://www.w3.org/1999/xlink'; |
| 369 | 369 |
| 370 var animatedNumberOptionalNumberAttributes = [ | 370 var animatedNumberOptionalNumberAttributes = [ |
| 371 'baseFrequency', | 371 'baseFrequency', |
| 372 'filterRes', | |
| 373 'kernelUnitLength', | 372 'kernelUnitLength', |
| 374 'order', | 373 'order', |
| 375 'radius', | 374 'radius', |
| 376 'stdDeviation', | 375 'stdDeviation', |
| 377 ]; | 376 ]; |
| 378 | 377 |
| 379 function namespacedAttributeName(attributeName) { | 378 function namespacedAttributeName(attributeName) { |
| 380 if (attributeName === 'href') | 379 if (attributeName === 'href') |
| 381 return 'xlink:href'; | 380 return 'xlink:href'; |
| 382 return attributeName; | 381 return attributeName; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 403 | 402 |
| 404 var result; | 403 var result; |
| 405 if (attributeName === 'd') | 404 if (attributeName === 'd') |
| 406 result = element['animatedPathSegList']; | 405 result = element['animatedPathSegList']; |
| 407 else if (attributeName === 'points') | 406 else if (attributeName === 'points') |
| 408 result = element['animatedPoints']; | 407 result = element['animatedPoints']; |
| 409 else | 408 else |
| 410 result = element[attributeName].animVal; | 409 result = element[attributeName].animVal; |
| 411 | 410 |
| 412 if (!result) { | 411 if (!result) { |
| 413 if (attributeName === 'filterResX' || attributeName === 'filterResY') | |
| 414 return null; | |
| 415 if (attributeName === 'pathLength') | 412 if (attributeName === 'pathLength') |
| 416 return '0'; | 413 return '0'; |
| 417 if (attributeName === 'preserveAlpha') | 414 if (attributeName === 'preserveAlpha') |
| 418 return 'false'; | 415 return 'false'; |
| 419 | 416 |
| 420 console.log('Unknown attribute, cannot get ' + element.className.baseVal +
' ' + attributeName); | 417 console.log('Unknown attribute, cannot get ' + element.className.baseVal +
' ' + attributeName); |
| 421 return null; | 418 return null; |
| 422 } | 419 } |
| 423 | 420 |
| 424 if (result instanceof SVGAngle || result instanceof SVGLength) | 421 if (result instanceof SVGAngle || result instanceof SVGLength) |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 setTimeout(function() { | 672 setTimeout(function() { |
| 676 if (finished) { | 673 if (finished) { |
| 677 return; | 674 return; |
| 678 } | 675 } |
| 679 finishTest(); | 676 finishTest(); |
| 680 }, 5000); | 677 }, 5000); |
| 681 } | 678 } |
| 682 | 679 |
| 683 window.assertAttributeInterpolation = assertAttributeInterpolation; | 680 window.assertAttributeInterpolation = assertAttributeInterpolation; |
| 684 })(); | 681 })(); |
| OLD | NEW |