• R/O
  • HTTP
  • SSH
  • HTTPS

sie: コミット

ブラウザでSVGを表示するSIEの開発 (SIE - to display SVG on legacy browsers)


コミットメタ情報

リビジョンb987c9349883152e497072c20f42583d9eb2463c (tree)
日時2016-04-04 23:10:18
作者dhrname <dhrname@user...>
コミッターdhrname

ログメッセージ

Modify the _setEndFrame method

変更サマリ

差分

--- a/org/w3c/dom/smil.js
+++ b/org/w3c/dom/smil.js
@@ -831,9 +831,15 @@ base("$calcMode").up("$attribute").mix( {
831831 return;
832832 }
833833 var ele = this.element;
834- ele.removeAttributeNS(this.attrNameSpace, this.attrName);
835- /*スタイルシートのプロパティも削除しておく*/
836- ele.style[this.attrName] = this.defaultValue;
834+ if (this.isDefault) {
835+ this.setAttribute(this.defaultValue);
836+ } else {
837+ /*初期段階でターゲットの要素に属性が指定されていない場合は、
838+ * 現在の属性値を削除するだけでよい*/
839+ ele.removeAttributeNS(this.attrNameSpace, this.attrName);
840+ /*スタイルシートのプロパティも削除しておく*/
841+ ele.style[this.attrName] = this.defaultValue;
842+ }
837843 value = ele = void 0;
838844 },
839845
@@ -1092,10 +1098,8 @@ base("$calcMode").up("$attribute").mix( {
10921098 /*イベントが設定されていないか、解決済みである場合*/
10931099 this.isEnd = true;
10941100 /*removeの場合、アニメーションを凍結せずに、もとに戻す*/
1095- if ((this.fill === "remove") && this.isDefault) {
1096- this.element.setAttributeNS(this.attrNameSpace, this.attrName, this.defaultValue);
1097- } else if (this.fill === "remove"){
1098- this.element.removeAttributeNS(this.attrNameSpace, this.attrName);
1101+ if ((this.fill === "remove")) {
1102+ this.removeAttribute();
10991103 }
11001104 line = frame = void 0;
11011105 return false;
@@ -1167,7 +1171,7 @@ base("$calcMode").up("$attribute").mix( {
11671171 * http://www.w3.org/TR/2001/REC-smil-animation-20010904/#AnimFuncValues*/
11681172 advance = duration ? ( (currentTime - line.begin) % duration ) / duration
11691173 : 0;
1170- this.element.setAttributeNS(this.attrNameSpace, this.attrName, this.tocall(advance));
1174+ this.setAttribute(this.tocall(advance));
11711175 line = duration = advance = void 0;
11721176 },
11731177
@@ -1186,7 +1190,7 @@ base("$calcMode").up("$attribute").mix( {
11861190 } else {
11871191 advance = 0;
11881192 }
1189- this.element.setAttributeNS(this.attrNameSpace, this.attrName, this.tocall(advance));
1193+ this.setAttribute(this.tocall(advance));
11901194 line = duration = advance = void 0;
11911195 }
11921196 },
旧リポジトリブラウザで表示