From: dhrname Date: Wed, 8 Feb 2017 12:14:42 +0000 (+0900) Subject: Lighten the setKey method X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=2e4fb7b073a82ed4f4f7f77569d633defab417eb;hp=74e2a6a5a4a4cc800af543f9c8f75057abb32553;p=sie%2Fsie.git Lighten the setKey method --- diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index 1da1374..76340f1 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -1315,6 +1315,7 @@ base("$calcMode").up("$attribute").mix( { this.getAttr("from", null), this.getAttr("to", null), this.getAttr("by", null) ), + toLength = to ? to.length : 0, keyTimes = this.getAttr("keyTimes", null), keySplines = this.getAttr("keySplines", null), keys, @@ -1330,7 +1331,7 @@ base("$calcMode").up("$attribute").mix( { return null; } /*toオブジェクトはtoとfromで一組となっているのでlengthが加算される*/ - if (this.isKeyError(keys.length, to.length)) { + if (this.isKeyError(keys.length, toLength)) { /*keyTimes属性とvalues属性のリストの個数が合致しない場合、アニメーションの効果がない * 仕様を参照 SMIL Animation 3.2.3. Animation function calculation modes * http://www.w3.org/TR/smil-animation/#AnimFuncCalcMode*/ @@ -1345,7 +1346,7 @@ base("$calcMode").up("$attribute").mix( { */ return null; } - for (var i=0;i