• R/O
  • HTTP
  • SSH
  • HTTPS

sie: コミット

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


コミットメタ情報

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

ログメッセージ

Start to support the animateMOtion element

変更サマリ

差分

--- a/org/w3c/dom/smil.js
+++ b/org/w3c/dom/smil.js
@@ -798,7 +798,7 @@ base("$calcMode").up("$attribute").mix( {
798798 return view.getComputedStyle(this._ele, "").getPropertyValue("color");
799799 }
800800 }
801- /*DOM Level2やIE11では、getAttributeNSメソッドは空文字を返す。他のブラウザではnullを返すことが多い
801+ /*DOM Level2やIE11では、getAttributeNSメソッドは空文字列を返す。他のブラウザではnullを返すことが多い
802802 *
803803 * >the empty string if that attribute does not have a specified or default value
804804 * http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-ElGetAttrNS*/
@@ -1808,11 +1808,13 @@ function getDocument()
18081808
18091809 /*文書からアニメーション関連要素を取り出して、オブジェクトを初期化*/
18101810 function getElement (svgDoc) {
1811- var $set = base("$calcMode").$attribute.$setElement;
1811+ var $set = base("$calcMode").$attribute.$setElement,
1812+ $animate = $set.$animateElement;
18121813 init($set, "set");
1813- init($set.$animateElement, "animate");
1814- init($set.$animateElement, "animateColor");
1815- init($set.$animateElement.$animateTransformElement, "animateTransform");
1814+ init($animate, "animate");
1815+ init($animate, "animateColor");
1816+ init($animate.$animateTransformElement, "animateTransform");
1817+ init($animate.$animateTransformElement.$motionElement, "animateMotion");
18161818 /*リンクのハッシュ読み取りで、ハイパーリンクのイベント処理
18171819 * たとえば、a要素のxlink:href="#hoge"で、<animate id="hoge"のとき、
18181820 * animate要素がハイパーリンク作動と同時に動くようになる
--- a/tool/Spec/spec/SvgDomSpec.js
+++ b/tool/Spec/spec/SvgDomSpec.js
@@ -2818,6 +2818,7 @@ describe("SMIL Animation Spec", function() {
28182818 expect(p.__transformList).toBeUndefined();
28192819 expect($animate.isCSS).toBeFalsy();
28202820 expect($animate.isSum).toBeFalsy();
2821+ expect($animate.attrName).toBe("transform");
28212822
28222823 $animate.init();
28232824 expect($animate.numberOfList).toBe(-1);
@@ -3014,6 +3015,7 @@ describe("SMIL Animation Spec", function() {
30143015 } );
30153016 afterEach( function() {
30163017 $animate.numberOfList = -1;
3018+ delete $animate.element;
30173019 p.__transformList = null;
30183020 } );
30193021 /*境界条件を調べておく (limit value analysis)*/
旧リポジトリブラウザで表示